Need help in my headshot system project
#3

Indentation.

You missed defining message

PHP код:
new message[80]; 
PHP код:
#include < a_samp >
#define FILTERSCRIPT
public OnFilterScriptInit() {
return 
1;
}
public 
OnFilterScriptExit() {
return 
1;
}
public 
OnPlayerTakeDamage(playeridissueridFloatamountweaponidbodypart
{
   if (
issuerid != INVALID_PLAYER_ID) {
   if (
weaponid == 33 || weaponid == 34 || weaponid == 33 || weaponid == 34) {
   if (
bodypart == 9
   {
       
SetPlayerHealth(playerid0.0);
       
GameTextForPlayer(issuerid,"~r~Headshot",2000,3);
       
PlayerPlaySound(issuerid178020.00.00.0);
       
GameTextForPlayer(playerid,"~r~Headshot",2000,3);
       
PlayerPlaySound(playerid178020.00.00.0);
       new 
message[80];
       
format(messagesizeof(message), "{FF7700}%s has been killed in a Headshot by %s {FF7700}"playerNameotherID);
       
SendClientMessageToAll(COLOR_ORANGEmessage);
       }
     }
  }
  return 
1;

Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)