[help] need help !! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [help] need help !! (
/showthread.php?tid=362777)
[help] need help !! -
NuLIO - 25.07.2012
in my server this not appear :http://i.imgur.com/LyB2p.png
plz guys i want it to appear ,
Re: [help] need help !! -
[KHK]Khalid - 25.07.2012
SendDeathMessage. You should have this under OnPlayerDeath:
pawn Код:
SendDeathMessage(killerid, playerid, reason);
Re: [help] need help !! -
Captain_Mani - 25.07.2012
^ What he said.
Re: [help] need help !! -
NuLIO - 25.07.2012
no it dont work bro this is my gamemode OnPlayerDeath
PHP код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid != INVALID_PLAYER_ID)
{
SetPlayerScore(killerid, GetPlayerScore(killerid)+2);
GivePlayerMoney(killerid, 4000);
SendClientMessage(killerid, -1, "Congratulation!You have gained 4000$ and +2 score.");
SetPlayerScore(playerid, GetPlayerScore(playerid) -1);
GivePlayerMoney(playerid, -2000);
SendClientMessage(playerid, -1, "You lost 2000$ because you got killed.");
SendDeathMessage(killerid, playerid, reason);
}
return 1;
}
Re: [help] need help !! -
Rudy_ - 25.07.2012
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
SendDeathMessage(killerid, playerid, reason);
if(killerid != INVALID_PLAYER_ID)
{
SetPlayerScore(killerid, GetPlayerScore(killerid)+2);
GivePlayerMoney(killerid, 4000);
SendClientMessage(killerid, -1, "Congratulation!You have gained 4000$ and +2 score.");
SetPlayerScore(playerid, GetPlayerScore(playerid) -1);
GivePlayerMoney(playerid, -2000);
SendClientMessage(playerid, -1, "You lost 2000$ because you got killed.");
}
return 1;
}
Re: [help] need help !! -
NuLIO - 25.07.2012
its work but if i jump from high building and i die i get 4900 and no score , and if i type /kill i got 4900 and no score
why and how can i fix it
Re: [help] need help !! -
Rudy_ - 25.07.2012
What you exactly want to do?
This will give the killer +1 score each time he kill someone.
And who die will lose -1 score
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid != INVALID_PLAYER_ID) SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
SetPlayerScore(playerid, GetPlayerScore(playerid) -1);
return 1;
}