Geplaatst: 27 januari 201015 jaren comment_1578639 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 201015 jaren door SiJ
Geplaatst: 27 januari 201015 jaren comment_1578654 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.
Geplaatst: 27 januari 201015 jaren Auteur comment_1578694 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
Geplaatst: 27 januari 201015 jaren comment_1578973 Sandra from this forum has created something a time ago, maybe you can use it: Look here. Good luck !
Geplaatst: 27 januari 201015 jaren comment_1578990 Why you dont use enum? EDIT: OnPlayerPickupPickup: for(new i;i<MAX_BIZ;i++) { if(hPickup[i] == pickup) { //... } } Bewerkt: 27 januari 201015 jaren door GTAguillaume
Geplaatst: 28 januari 201015 jaren comment_1579435 Why you asking on a dutch forum?, and not on forum.sa-mp.com ?
Geplaatst: 28 januari 201015 jaren Auteur comment_1579554 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.
Geplaatst: 28 januari 201015 jaren comment_1579651 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 201015 jaren door Crusher!!
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: door SiJ