20.05.2015, 18:17
Quote:
if(strcmp(cmd, "/respawn", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "{D580FE}Foloseste:{FFFFFF} /respawn [playerid/PartOfName]"); return 1; } new playa; playa = ReturnUser(tmp); if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pHelper] >= 1) { if(IsPlayerConnected(playa)) { if(playa != INVALID_PLAYER_ID) { if(PlayerInfo[playa][pJailed] == 1) { SendClientMessage(playerid,COLOR_GREY," You can`t use this command on that player because is in jail !"); return 1; } if(WantedLevel[playa] >= 1) { SendClientMessage(playerid,COLOR_GREY," You can`t use this command on that player, is currently Wanted !"); return 1; } if(SpawnChange[playerid]) { GetPlayerName(playa, giveplayer, sizeof(giveplayer)); SpawnPlayer(playa); ResetPlayerWeapons(playa); SetPlayerArmour(playa, 0); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* You have respawned player %s.", giveplayer); SendClientMessage(playerid, COLOR_LIGHTRED, string); format(string, sizeof(string), "*You have been respawned by Admin{FF3300} %s.", sendername); SendClientMessage(playa, COLOR_WHITE, string); format(string, 128, "AdmCmd: %s has respawned the player %s ", sendername, giveplayer); ABroadCast(COLOR_YELLOW,string,1); HBroadCast(COLOR_YELLOW,string); return 1; } } } } else { SendClientMessage(playerid, COLOR_GRAD1, " Nu ai voie sa folosesti aceasta comanda!"); } } return 1; } |
tell me if you need onplayerdeath code..