Multiple command.
#1

Hey,

Is there a simple way for doing this?:

(This is a example)

/v(ehicle) [BUY/SELL/SELLTO/LOCK] <param 1> <param 2>

When the player type: /v sellto danny
the params can i split with sscanf, but i dont know how i can do that with like /v buy, there dont need to be something extra.

I hope you understand me xd.
Wouter
Reply
#2

pawn Код:
sscanf(params,"sdd",string,params1,params2)
if(!strcmp(string,"buy"))
{
    //Buy
}
Reply
#3

then you must type params 1 and 2 ..?
Reply
#4

Yes.
Reply
#5

But sometimes, like: sell, they dont need to type the param, only with sellto.
Reply
#6

They don't need to type the whole params except you put if statements with sscanf.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)