12.06.2014, 14:14
As the title says , a few commands in my script work only for ID 0 .
They're alot of 'em so if you can't tell me what could be wrong , ill provide a few.
Example :
If i type /goto , it will tp me to id 0 and if i type /goto 1 it will give the sscanf error message.
They're alot of 'em so if you can't tell me what could be wrong , ill provide a few.
Example :
pawn Код:
CMD:get(playerid, params[])
{
new id;
if(IsPlayerConnected(id))
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
if(sscanf(params, "u", id))
{
new string[300];
new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
new Float:x, Float:y, Float:z; GetPlayerPos(playerid,x,y,z); SetPlayerInterior(id,GetPlayerInterior(playerid));
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(id, PlayerName, sizeof(PlayerName));
format(string, sizeof(string), "{00FFFF}*{EEEEEE}Administrator %s has teleported you to him", name);
SendClientMessage(id,COLOR_WHITE, string);
format(string, sizeof(string), "{00FFFF}*{EEEEEE}You have teleported %s to you", PlayerName);
SendClientMessage(playerid,COLOR_WHITE, string);
SetPlayerVirtualWorld(id,GetPlayerVirtualWorld(playerid));
SetPlayerPos(id,x+2,y,z);
return 1;
}
else return SendClientMessage(playerid, COLOR_RED, "{00FFFF}*{EEEEEE}Usage:gethere[Playername/ID]");
}
else return NOACCESS
}
else return SendClientMessage(playerid, COLOR_RED, "Player is not connected.");
}