SiJ Geplaatst: 27 januari 2010 Rapport Geplaatst: 27 januari 2010 (bewerkt) Hey everybody, Sorry, I'll speak in English cause I don't know your language.. I'd like to ask your help, converting my house system, to business system.. I've made AddBiz function, but I couldn't complete the script cause I'm stuck... Here's what I've done (some parts are still left from house system): http://pastebin.com/m368d42fb So what is still needed: When player is on pickup, show him GameTextForPlayer("Business [name] owner: [name] status: [locked/unlocked]") And commands: /buybiz /sellbiz /setprice (for production price (production depends on business type)) Thank you Bewerkt: 27 januari 2010 door SiJ Reageren
Big Boss Geplaatst: 27 januari 2010 Rapport Geplaatst: 27 januari 2010 It's a pretty sofisticated script, but I think you need to look in this direction: public OnPlayerPickUpPickup(playerid, pickupid) { for(new b = 0; b < MAX_BIZ; b++) { if(IsPlayerInRangeOfPoint(playerid, 2.0, IconX[b], IconY[b], IconZ[b])) { GetBizStats(playerid, b); return 1; } } return 1; } You can pretty much use the same code to check if the player is near a business when he's using /buybiz or /sellbiz, for example. Reageren
SiJ Geplaatst: 27 januari 2010 Auteur Rapport Geplaatst: 27 januari 2010 It's a pretty sofisticated script, but I think you need to look in this direction: public OnPlayerPickUpPickup(playerid, pickupid) { for(new b = 0; b < MAX_BIZ; b++) { if(IsPlayerInRangeOfPoint(playerid, 2.0, IconX[b], IconY[b], IconZ[b])) { GetBizStats(playerid, b); return 1; } } return 1; } You can pretty much use the same code to check if the player is near a business when he's using /buybiz or /sellbiz, for example. I don't think IsPlayerInRangeOfPoint is needed to be checked OnPlayerPickupPickUp callback.. I think if(pickupid == SomePickup) would be ok.. but anyway I think I'll know how can I make it.. Thanks for reply Reageren
sean5874 Geplaatst: 27 januari 2010 Rapport Geplaatst: 27 januari 2010 Sandra from this forum has created something a time ago, maybe you can use it: Look here. Good luck ! Reageren
GTAguillaume Geplaatst: 27 januari 2010 Rapport Geplaatst: 27 januari 2010 (bewerkt) Why you dont use enum? EDIT: OnPlayerPickupPickup: for(new i;i<MAX_BIZ;i++) { if(hPickup[i] == pickup) { //... } } Bewerkt: 27 januari 2010 door GTAguillaume Reageren
Crusher!! Geplaatst: 28 januari 2010 Rapport Geplaatst: 28 januari 2010 Why you asking on a dutch forum?, and not on forum.sa-mp.com ? Reageren
SiJ Geplaatst: 28 januari 2010 Auteur Rapport Geplaatst: 28 januari 2010 Sandra from this forum has created something a time ago, maybe you can use it: Look here. Good luck ! Thanks.. But I've decided to make my own stuff Why you dont use enum? EDIT: OnPlayerPickupPickup: for(new i;i<MAX_BIZ;i++) { if(hPickup[i] == pickup) { //... } } Because I don't know how to use enum.. :O But I think I can make it without it.. Thanks.. Why you asking on a dutch forum?, and not on forum.sa-mp.com ? Because you can get help on sa-mp forums only in 3-5 days.. Thanks, I know how to make my own biz system now.. Topic may be locked.. Thanks. Reageren
Crusher!! Geplaatst: 28 januari 2010 Rapport Geplaatst: 28 januari 2010 (bewerkt) Because you can get help on sa-mp forums only in 3-5 days.. Thanks, I know how to make my own biz system now.. Topic may be locked.. Thanks. Thats true, Lol you don't see any newbie scripter that posting here Edit: lol, kromme zin xD Bewerkt: 28 januari 2010 door Crusher!! Reageren
Recommended Posts
Een reactie plaatsen
Je kan nu een reactie plaatsen en pas achteraf registreren. Als je al lid bent, log eerst in om met je eigen account een reactie te plaatsen.