I'm trying to make msg according with death reason -
felipex - 16.07.2010
yo, I did this code :
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
ResetPlayerMoney(playerid);
ResetPlayerWeapons(playerid);
SendDeathMessage(killerid, playerid, reason);
SendDeathMessage(playerid, reason);
GivePlayerMoney(killerid, 10000);
if(reason >= 1 || reason <= 46)
{
new string[156],pName[30],pName2[30];
GetPlayerName(playerid, pName, 30);
GetPlayerName(killerid, pName2, 30);
format(string,sizeof(string),"SERVER PVP: %s matou %s",pName2,pName);
SendClientMessageToAll(COR_ADICIONAL, string);
}
else if(reason >= 47) {
new string[156],pName3[30];
GetPlayerName(playerid, pName3, 30);
format(string,sizeof(string),"SERVER PVP : %s se matou / morreu por explosгo", pName3);
SendClientMessageToAll(COR_ADICIONAL, string);
return 1;
}
return 1;
}
but nothing happens =s . I wanna that first msg :Server pvp: %s matou %s (killerid killed the playerid). For the other, %s se matou / morreu na explosгo.For the first all weapons, which I found here
http://weedarr.wikidot.com/gunlist // (reason 1 till 46) and for the /kill command / explosion, the reason 47 till end, anyone? =s
Re: I'm trying to make msg according with death reason -
felipex - 16.07.2010
Someone..
Re: I'm trying to make msg according with death reason -
Carlton - 16.07.2010
Are you killing yourself or someone else is killing you?
Re: I'm trying to make msg according with death reason -
felipex - 16.07.2010
both of them.
Re: I'm trying to make msg according with death reason -
KennethRandall - 16.07.2010
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
ResetPlayerMoney(playerid);
ResetPlayerWeapons(playerid);
SendDeathMessage(killerid, playerid, reason);
SendDeathMessage(playerid, reason);
GivePlayerMoney(killerid, 10000);
if(killerid != INVALID_PLAYER_ID)
{
new string[156],pName[30],pName2[30];
GetPlayerName(playerid, pName, 30);
GetPlayerName(killerid, pName2, 30);
format(string,sizeof(string),"SERVER PVP: %s matou %s",pName2,pName);
SendClientMessageToAll(COR_ADICIONAL, string);
}
else if(killerid == INVALID_PLAYER_ID) {
new string[156],pName3[30];
GetPlayerName(playerid, pName3, 30);
format(string,sizeof(string),"SERVER PVP : %s se matou / morreu por explosгo", pName3);
SendClientMessageToAll(COR_ADICIONAL, string);
return 1;
}
return 1;
}
Re: I'm trying to make msg according with death reason -
felipex - 16.07.2010
Didn't work =d , according to this link :
http://weedarr.wikidot.com/gunlist , the weapons which players kill each other are 0 till 46, and 47 till 201 are death reason, such as drive by, and helicoptery.I wanted to use a message for reason 0 till 46, and another to 47 till 201, this is the problem.
Re: I'm trying to make msg according with death reason -
KennethRandall - 16.07.2010
Quote:
Originally Posted by felipex
Didn't work =d , according to this link : http://weedarr.wikidot.com/gunlist , the weapons which players kill each other are 0 till 46, and 47 till 201 are death reason, such as drive by, and helicoptery.I wanted to use a message for reason 0 till 46, and another to 47 till 201, this is the problem.
|
It simply reads if someone died per killer, or not, if not, you will get the second message, if yes, you will get the first message. Or try to use something like SendDeathMessage
Re: I'm trying to make msg according with death reason -
felipex - 16.07.2010
I tried it, but if I use just one message on "onplayerdeath", it will be so : %s matou %s , but if it's through the command /kill, will be so : (...) matou %s, but as I said, I tried it : if(reason >= 0 || reason <= 46) and nothing :S
Re: I'm trying to make msg according with death reason -
felipex - 16.07.2010
if you dont know, just tell me death reason list site, or then, the starting code, such as that : if(reason...
Re: I'm trying to make msg according with death reason -
felipex - 16.07.2010
somebody, wtf lol u_u'