SA-MP Forums Archive
[Help] Command with more params - 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: [Help] Command with more params (/showthread.php?tid=535293)



[Help] Command with more params - Hantex. - 02.09.2014

Hi guys,I'm trying to develop the command /v sell, but I don't know how can I pass multiple parameters using sscanf(example: /v sell [playerid/name] [price]). How can i do?


Re: [Help] Command with more params - SickAttack - 02.09.2014

pawn Код:
new id, price;
if(strcmp(params, "sell", true) == 0)
{
    if(sscanf(params, "{s}ui", id, price)) return SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /v sell [name/id] [price].");
}
https://sampforum.blast.hk/showthread.php?tid=120356


Respuesta: Re: [Help] Command with more params - Hantex. - 03.09.2014

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
pawn Код:
new id, price;
if(strcmp(params, "sell", true) == 0)
{
    if(sscanf(params, "{s}ui", id, price)) return SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /v sell [name/id] [price].");
}
https://sampforum.blast.hk/showthread.php?tid=120356
Thanks!