/v lock bug
#1

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
Reply
#2

Remove second sscanf check and add optional Integer in the first;
Work down with the optional value;
Reply
#3

can you fix it please
Reply
#4

Thats an pretty fucked up command.
I'll try to make a demo version.
Reply
#5

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;
}
Reply
#6

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)