21.02.2015, 22:21
You're trying to use "option" as an integer in sscanf, but when defining "option" you add a string size, and try to use strcmp to compare it like a normal string.
Here's a fixed version, using a switch to compare the integer:
Here's a fixed version, using a switch to compare the integer:
pawn Код:
CMD:agivelicense(playerid, params[])
{
new id, option;// string[128];
if(PlayerInfo[playerid][pAdminLevel] < 4) return FaraAcces;
if(sscanf(params, "ui", id, option)) return SendClientMessage(playerid, 0xFFFFFFFF, "Folosire: {C0C0C0}/agivelicense [playerid] [Type] (Type 1 = Car | Type 2 = Weapon | Type 3 = Boat | Type 4 = Fly)");
switch(option)
{
case 1: return SendClientMessage(playerid,-1,"Test Car");
case 2: return SendClientMessage(playerid,-1,"Test Weapon ");
case 3: return SendClientMessage(playerid,-1,"Test Boat");
case 4: return SendClientMessage(playerid,-1,"Test Fly");
}
return 1;
}

