17.08.2011, 02:21
Hello,
I just don't understand this. Normal this respawn command works. But now when I type ingame /respawn 0 it's saying that the player isn't connected. Code:
I just don't understand this. Normal this respawn command works. But now when I type ingame /respawn 0 it's saying that the player isn't connected. Code:
pawn Код:
//----------[Respawn]----------
CMD:respawn(playerid, params[])
{
{
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid,COLOR_RED,".:: You are not authorized to use this command ::.");
new targetid;
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_DGREY"[CMD] / "#COL_SGREY"[PlayerID/PartOfName]");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_ORANGE"[ERROR]"#COL_LRED" Player not connected!");
else
{
new string[128];
new pName[24], pTame[24];
GetPlayerRame(playerid,pName,24);
GetPlayerRame(targetid,pTame,24);
format(string,sizeof string,""#COL_ORANGE"[SERVER]"#COL_LRED" %s has been respawned by Administrator %s.",pTame,pName);
SendClientMessageToAll(COLOR_RED, string);
SpawnPlayer(targetid);
}
}
return 1;
}