A few commands work on ID 0 only.
#3

Код:
CMD:get(playerid, params[])
{
new id;
if(PlayerInfo[playerid][pAdmin] >= 1)
{
if(sscanf(params, "i", id))
{
 SendClientMessage(playerid, COLOR_RED, "{00FFFF}*{EEEEEE}Usage:gethere[Playername/ID]");
return 1;
}
else 
{
if(IsPlayerConnected(id))
{
new string[256];
new name[MAX_PLAYER_NAME+1], PlayerName[MAX_PLAYER_NAME+1];
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);
}
else
{
 SendClientMessage(playerid, COLOR_RED, "Inactive");
return 1;
}
}
}
else
{
 SendClientMessage(playerid, COLOR_RED, "You are not an Admin");
return 1;
}
return 1;
}
Reply


Messages In This Thread
A few commands work on ID 0 only. - by Johnson_Brooks - 12.06.2014, 14:14
AW: A few commands work on ID 0 only. - by BiosMarcel - 12.06.2014, 14:18
Re: A few commands work on ID 0 only. - by Amrev - 12.06.2014, 14:21
Re: A few commands work on ID 0 only. - by DavidBilla - 12.06.2014, 14:25
Re: A few commands work on ID 0 only. - by Threshold - 12.06.2014, 14:37

Forum Jump:


Users browsing this thread: 1 Guest(s)