01.04.2009, 14:55
here is my respawn command...
if the player is in a car, the player gets stuck in the car until /slap... Then he can do F and exit.
pawn Код:
dcmd_respawn(playerid,params[])
{
if(PlayerInfo[playerid][pAdmin] == 0) return 1;
new id,pName[MAX_PLAYER_NAME],idName[MAX_PLAYER_NAME],server[256];
if(sscanf(params,"u",id)) return SendClientMessage(playerid,COLOR_DARKRED,"Usage: /respawn <playerid/partofname>");
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_DARKRED, "Player not found");
GetPlayerName(playerid,pName,sizeof(pName));
GetPlayerName(id,idName,sizeof(idName));
format(server,sizeof(server),"%s was respawned by Admin %s",idName,pName);
SetPlayerVirtualWorld(playerid,0);
SendClientMessageToAll(COLOR_DARKRED,server);
RemovePlayerFromVehicle(id);
SpawnPlayer(id);
return 1;
}