05.04.2013, 12:52
hey everyone .
i didn't understand whats the problem .
i tried to script this command:
but the command doesn't work right and the console gives me this message every time i enter the command :
any idea about how to fix that shit? :/
i didn't understand whats the problem .
i tried to script this command:
pawn Код:
CMD:drift(playerid, params[])
{
new option[3];
if(!sscanf(params, "i[3]", option))
{
if(strcmp(option, "1", true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
new vid;
vid = GetPlayerVehicleID(playerid);
SetPlayerPos(playerid,1264.5880, -2013.3972, 59.2888);
SetVehiclePos(vid,1264.5880, -2013.3972, 59.2888);
PutPlayerInVehicle(playerid,vid,0);
GameTextForPlayer(playerid, "You have been teleported to\n ~r~Drift 1", 3000, 5);
}
else
{
SetPlayerPos(playerid,1264.5880, -2013.3972, 59.2888);
GameTextForPlayer(playerid, "You have been teleported to\n ~r~Drift 1", 3000, 5);
}
return 1;
}
if(strcmp(option, "2", true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
new vid;
vid = GetPlayerVehicleID(playerid);
SetPlayerPos(playerid,-299.6478, 1523.1639, 75.3594);
SetVehiclePos(vid,-299.6478, 1523.1639, 75.3594);
PutPlayerInVehicle(playerid,vid,0);
GameTextForPlayer(playerid, "You have been teleported to\n ~r~Drift 2", 3000, 5);
}
else
{
SetPlayerPos(playerid,-299.6478, 1523.1639, 75.3594);
GameTextForPlayer(playerid, "You have been teleported to\n ~r~Drift 2", 3000, 5);
}
return 1;
}
if(strcmp(option, "3", true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
new vid;
vid = GetPlayerVehicleID(playerid);
SetPlayerPos(playerid,-2401.7813, -594.6240, 132.6484);
SetVehiclePos(vid,-2401.7813, -594.6240, 132.6484);
PutPlayerInVehicle(playerid,vid,0);
GameTextForPlayer(playerid, "You have been teleported to\n ~r~Drift 3", 3000, 5);
}
else
{
SetPlayerPos(playerid,-2401.7813,-594.6240, 132.6484);
GameTextForPlayer(playerid, "You have been teleported to\n ~r~Drift 3", 3000, 5);
}
return 1;
}
else return GameTextForPlayer(playerid, "~r~USAGE : ~w~/Drift 1-3", 3000, 5);
}
else return GameTextForPlayer(playerid, "~r~USAGE : ~w~/Drift 1-3", 3000, 5);
}
Код:
[05:49:09] sscanf warning: Format specifier does not match parameter count. [05:49:11] sscanf warning: Format specifier does not match parameter count. [05:49:13] sscanf warning: Format specifier does not match parameter count.