Its not the command is i though i explained.
pawn Код:
Here are some Commands.
CMD:goto(playerid,params[])
{
if(PlayerInfo[playerid][pAdmin] >=5)
{
new id,Float:X,Float:Y,Float:Z,pName[MAX_PLAYER_NAME],string[126],iName[MAX_PLAYER_NAME],string2[126];
if (unformat(params, "u",id))SendClientMessage(playerid,COLOR_RED,"Usage: /Goto [ID]");
if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "System: Invalid ID");
else
{
new vWorld = GetPlayerVirtualWorld(id);
SetPlayerVirtualWorld(playerid,vWorld);
new Interior = GetPlayerInterior(id);
SetPlayerInterior(playerid,Interior);
GetPlayerPos(id,X,Y,Z);
SetPlayerPos(playerid,X,Y,Z);
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
format(string,128,"Admin %s has teleported to you",pName);
SendClientMessage(id,COLOR_ORANGE,string);
GetPlayerName(id, iName, MAX_PLAYER_NAME);
format(string2,128,"You have gone to %s",iName);
SendClientMessage(id,COLOR_ORANGE,string2);
}
}
return 1;
}
CMD:gethere(playerid,params[])
{
if(PlayerInfo[playerid][pAdmin] >=5)
{
new id,Float:X,Float:Y,Float:Z,pName[MAX_PLAYER_NAME],string[126],iName[MAX_PLAYER_NAME],string2[126];
if (unformat(params, "u",id))SendClientMessage(playerid,COLOR_RED,"Usage: /Gethere [ID]");
if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "System: Invalid ID");
else
{
new vWorld = GetPlayerVirtualWorld(playerid);
SetPlayerVirtualWorld(id,vWorld);
new Interior = GetPlayerInterior(playerid);
SetPlayerInterior(id,Interior);
GetPlayerPos(playerid,X,Y,Z);
SetPlayerPos(id,X,Y,Z);
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
format(string,128,"Admin %s has teleported you",pName);
SendClientMessage(id,COLOR_ORANGE,string);
GetPlayerName(id, iName, MAX_PLAYER_NAME);
format(string2,128,"You have Gotten to %s",iName);
SendClientMessage(id,COLOR_ORANGE,string2);
}
}
return 1;
}