Any way
#1

Hi !

I have /sellcar <playerid> <amount> to sell a car but some players when want to buy, they lie the seller to type something like /sellcar adolf 19 000 000. Then, the car will be sold just with 19$. How can I stop it? Can I detect somehow when he's typing like that?
Reply
#2

Show us your sellcar command.

Do you have sscanf?
Reply
#3

Really, I'd just ban those asshats for exploiting the system. Use a confirmation dialog and/or set a minimum price.
Reply
#4

Quote:
Originally Posted by Vince
Посмотреть сообщение
Really, I'd just ban those asshats for exploiting the system. Use a confirmation dialog and/or set a minimum price.
isn't it easyer to use sscanf and check for 2 inputs, if it's more, just put a error.
Reply
#5

Quote:
Originally Posted by justjamie
Посмотреть сообщение
isn't it easyer to use sscanf and check for 2 inputs, if it's more, just put a error.
Even if there's sscanf used, problem will still be the same if the seller writes both the player name and amount. The price amount should not be desirable in this case.

I'd say, create an array to hold specific prices for the vehicle depending on their model. So, seller just have to type /sellcar <name> and the price can be fetched.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)