09.06.2016, 11:41
Hello Sa-Mp Brothers, I have a bit of a problem with my re-spawn command.
I want to do the thing when I spawn a player to restore his last position but I did not succeed can you bros help me with this command so sort it out Please ?
here is my command:
I want to do the thing when I spawn a player to restore his last position but I did not succeed can you bros help me with this command so sort it out Please ?
here is my command:
Код:
CMD:spawn(playerid, params[]) { if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first."); if(IsPlayerConnected(playerid)) { if (PlayerInfo[playerid][pAdmin] >= 1) { new id,sendername[30],giveplayer[30],string[256]; if(sscanf(params, "u", id)) return SCM(playerid,COLOR_WHITE,"{FF9900}Scrie: {cef0ac}/spawn <Name/Playerid>"); { if(IsPlayerConnected(id)) { if(id != INVALID_PLAYER_ID) { GetPlayerName(id, giveplayer, sizeof(giveplayer)); SpawnPlayer(id); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* Admin %s has spawn-ed you.", sendername); SendClientMessage(id, COLOR_IN2, string); format(string, sizeof(string), "You have respawned %s.", giveplayer); SendClientMessage(playerid, COLOR_IN2, string); format(string, sizeof(string), "AdmCmd: %s has /spawn-ed %s.",sendername, giveplayer); ABroadCast(COLOR_ADMCMD,string,1); HLChat(COLOR_ADMCMD,string); return 1; } } else { SCM(playerid,COLOR_WHITE,"{FFFFCC}Error: Player not connected."); } } } else { SendClientMessage(playerid, COLOR_ERROR, AdminOnly); } } return 1; }