[HELP] Send Death Message With Weapon Name..?
#1

i need something like this when player death..
Код:
new gunname[32], string[64], fName[MAX_PLAYER_NAME], sName[MAX_PLAYER_NAME];
  GetWeaponName(reason,gunname,sizeof(gunname));
  GetPlayerName(playerid,fName,MAX_PLAYER_NAME);
  GetPlayerName(killerid,sName,MAX_PLAYER_NAME);
  format(string,sizeof(string),"%s got 1 point for killing %s. %s.",sName,fName,gunname);
But;
Код:
GetWeaponName(reason,gunname,sizeof(gunname));
Isn't work for me :S How can i send death message with weapon name? Or is my script true?

Like;
Код:
TraNe15 got 1 points for killing blabla. Weapon:Ak-47
Thanks For Helps...

-TraNe15-
Reply
#2

Is this all of your script or do you have SendClientMessage too?
Reply
#3

Let me show it;

Код:
public OnPlayerDeath(playerid,killerid,reason)
{
  //Normal kill
  new gunname[32], string[64], fName[MAX_PLAYER_NAME], sName[MAX_PLAYER_NAME];
  GetWeaponName(reason,gunname,sizeof(gunname));
  GetPlayerName(playerid,fName,MAX_PLAYER_NAME);
  GetPlayerName(killerid,sName,MAX_PLAYER_NAME);
  format(string,sizeof(string),"%s got 1 point for killing %s. %s.",sName,fName,gunname);
  SendClientMessageToAll(COLOR_HL2,string);
  SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
  return 1;
}
Reply
#4

GetWeaponName is bugged I believe, there is a variable/function sort that you can find in some GM's released on the forums which can help you bypass this .
Reply
#5

Do you know one? i dont want to downlaod all GM in sa-mp forum
Reply
#6

Does your code send the message? If it does, what does it say?
Reply
#7

Yes it sends the message except weapon name.
It sends like this;
Код:
MadeMan got 1 point for killing TraNe15. .
(Just a dot)


-TraNe15-
Reply
#8

What weapons did you try?
Reply
#9

Just /kill worked for me.. And i tried with barrels.. But i didnt try on a person.. Can you join my server for 1-2 minutes just for testing?
Reply
#10

Quote:
Originally Posted by TraNe15
Just /kill worked for me.. And i tried with barrels.. But i didnt try on a person.. Can you join my server for 1-2 minutes just for testing?
Sure. What's the IP?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)