05.08.2011, 15:06
pawn Код:
if(!strcmp(cmd, "/tp"))
{
{
new targetid, string[128];
if(sscanf(params, "uz", targetid)) return SendClientMessage(playerid, COLOR_WHITE, ""[CMD] / [PlayerID/PartOfName]");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_WHITE, "[ERROR] Player not connected!");
else
{
new pName[24];
GetPlayerRame(targetid,pName,128);
format(string, sizeof(string), "You succesfully teleported to [%d] %s.",targetid, pName);
SendClientMessage(playerid,COLOR_RED,string);
SetPlayerInterior(playerid,GetPlayerInterior(targetid));
new Float:TPX, Float:TPY, Float:TPZ;
GetPlayerPos(targetid, TPX, TPY, TPZ);
SetPlayerPos(playerid, TPX, TPY, TPZ+1);
}
}
return 1;
}