[HELP] compile crash
#5

try this

Код:
dcmd_akill(playerid,params[]) 
{
  if(gPlayerInfo[playerid][PLAYER_LEVEL] > gCommands[AKILL]) 
  {
    if(!strlen(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /akill [id | name]");
      new player1, new string[128];
      player1 = strval(params);

      if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID) 
      {
        GetPlayerName(player1, playername, sizeof(playername));	
        format(string,sizeof(string),"You have successfully admin-killed player \'%s\'.", PlayerName(player1)); 
        SendClientMessage(playerid,COLOUR_ORANGE,string);
        format(string, sizeof(string), "You have been admin-killed by administrator \'%s\'.", PlayerName(playerid));
	    SendClientMessage(player1, COLOUR_ORANGE, string);
        return SetPlayerHealth(player1, 0.0);
	  }else return SendClientMessage(playerid, red, "Player is not connected!");
  }else{ 
    format(string, sizeof(string), "You must be administrator level %d to use that command!", gCommands[AKILL]);
    return SendClientMessage(playerid, COLOUR_ORANGE, string);
  }
}
Код:
stock PlayerName(playerid) {

	new Name[MAX_PLAYER_NAME];
	GetPlayerName(playerid, Name, sizeof(Name));
	return Name;
}
Reply


Messages In This Thread
[HELP] compile crash - by The_Tough - 30.07.2009, 19:43
Re: [HELP] compile crash - by Khelif - 30.07.2009, 19:45
Re: [HELP] compile crash - by The_Tough - 30.07.2009, 19:55
Re: [HELP] compile crash - by illay - 30.07.2009, 20:22
Re: [HELP] compile crash - by Khelif - 30.07.2009, 20:27
Re: [HELP] compile crash - by kaisersouse - 30.07.2009, 20:31

Forum Jump:


Users browsing this thread: 1 Guest(s)