Getting last vehicle id player was in.
#8

yes, looping is the worst way to script. why not set the customers "allowance" vehicleid to the vehicleid the dealer (you) is sitting in?
/offer could contain
pawn Код:
SetPVarInt(customerID,"MayOpenTrunkOfVehicleID",GetVehicleID(playerid),1);
then, the customer, entering a /opentrunk command, should be checked for being in range indeed
in case you want to offer items to more than just 1 customer at a time (like a big sell-out), then a loop through all vehicles is sometimes the easier way. is not that 10 players typing /opentrunk will cause a server crash.. each dealer system can be optimized - my idea was a 2-way connection between the seller and customer, it would be a pain to evolve it to work with 2 or more dealers/customers at the same time. yourr right there. i guess you got some ideas on what to think about with your script, and find the best suitable way to do it hehe
Reply


Messages In This Thread
Getting last vehicle id player was in. - by Dokins - 12.03.2012, 23:18
Re: Getting last vehicle id player was in. - by ddnbb - 12.03.2012, 23:31
Re: Getting last vehicle id player was in. - by eesh - 13.03.2012, 04:04
Re: Getting last vehicle id player was in. - by ddnbb - 13.03.2012, 10:28
Re: Getting last vehicle id player was in. - by ddnbb - 13.03.2012, 10:31
Re: Getting last vehicle id player was in. - by Babul - 13.03.2012, 10:51
Re: Getting last vehicle id player was in. - by ddnbb - 13.03.2012, 11:01
Re: Getting last vehicle id player was in. - by Babul - 13.03.2012, 11:11
Re: Getting last vehicle id player was in. - by ddnbb - 13.03.2012, 11:30

Forum Jump:


Users browsing this thread: 2 Guest(s)