16.05.2013, 11:18
pawn Код:
CMD:gotopos(playerid,params[])
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
new targetid;
if(sscanf(params, "u", targetid)) SendClientMessage(playerid,-1,""chat" /gotopos [playerid]");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online");
new Float:x,Float:y,Float:z,inter;
GetPlayerPos(targetid,Float:x,Float:y,Float:z);
inter = GetPlayerInterior(targetid);
SetPlayerPosEx(playerid,Float:x,Float:y,Float:z,inter,0);
}
else {
SendClientMessage(playerid,-1,""chat""COL_GREY" You cannot use this command");
}
return 1;
}
You need ZCMD and SSCANF includes.