Multiple command. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Multiple command. (
/showthread.php?tid=283903)
Multiple command. -
wouter0100 - 17.09.2011
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
Re: Multiple command. -
=WoR=Varth - 17.09.2011
pawn Код:
sscanf(params,"sdd",string,params1,params2)
if(!strcmp(string,"buy"))
{
//Buy
}
Re: Multiple command. -
wouter0100 - 17.09.2011
then you must type params 1 and 2 ..?
Re: Multiple command. -
=WoR=Varth - 17.09.2011
Yes.
Re: Multiple command. -
wouter0100 - 17.09.2011
But sometimes, like: sell, they dont need to type the param, only with sellto.
Re: Multiple command. -
=WoR=Varth - 17.09.2011
They don't need to type the whole params except you put if statements with sscanf.