Hello Everyone!
#5

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;
}

but that's not happen only on cmd respawn, it's happen if i use /respawn or if i am killed..
tell me if you need onplayerdeath code..
Reply


Messages In This Thread
Hello Everyone! - by Curmei - 20.05.2015, 14:10
Re: Hello Everyone! - by kalanerik99 - 20.05.2015, 14:17
Re: Hello Everyone! - by kyriakos587 - 20.05.2015, 17:58
Re: Hello Everyone! - by Luis- - 20.05.2015, 17:59
Re: Hello Everyone! - by Curmei - 20.05.2015, 18:17
Re: Hello Everyone! - by Luis- - 20.05.2015, 18:59

Forum Jump:


Users browsing this thread: 1 Guest(s)