/v lock bug - 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: /v lock bug (
/showthread.php?tid=427603)
/v lock bug -
UnAngel - 02.04.2013
Hello i have problem when i type the commands /v lock its work but when i type the number [1-3] its doesnt work help me fix it please
http://pastebin.com/uXmXH2i3
Re: /v lock bug -
Hanger - 02.04.2013
Remove second sscanf check and add optional Integer in the first;
Work down with the optional value;
Re: /v lock bug -
UnAngel - 02.04.2013
can you fix it please
Re: /v lock bug -
faff - 02.04.2013
Thats an pretty fucked up command.
I'll try to make a demo version.
Re: /v lock bug -
Hanger - 02.04.2013
If you dont understand then use it this way
Код:
COMMAND:vehicle(playerid, params[])
{
new name[15];
if(sscanf(params, "s[15]", name))
{
SendClientMessage(playerid, COLOR_GREY, TEXT_SYNTAX"(/v)ehicle <Usage>");
SendClientMessage(playerid, COLOR_GREY, "Tip: lock(1-3)");
return 1;
}
if(strcmp(name, "lock1", true) == 0)
{
}
else if(strcmp(name, "lock2", true) == 0)
{
}
else if(strcmp(name, "lock3", true) == 0)
{
}
else
{
SendClientMessage(playerid, COLOR_GREY, TEXT_SYNTAX"(/v)ehicle <Usage>");
SendClientMessage(playerid, COLOR_GREY, "Tip: lock(1-3)");
return 1;
}
return 1;
}
Re: /v lock bug -
UnAngel - 02.04.2013
i know how to do this i try to leran how to fix my new commands can you fix it and show me how its look