[help] need help !!
#1

in my server this not appear :http://i.imgur.com/LyB2p.png

plz guys i want it to appear ,
Reply
#2

SendDeathMessage. You should have this under OnPlayerDeath:

pawn Код:
SendDeathMessage(killerid, playerid, reason);
Reply
#3

^ What he said.
Reply
#4

no it dont work bro this is my gamemode OnPlayerDeath

PHP код:
public OnPlayerDeath(playeridkilleridreason)
{
    if(
killerid != INVALID_PLAYER_ID)
    {
    
SetPlayerScore(killeridGetPlayerScore(killerid)+2);
    
GivePlayerMoney(killerid4000);
    
SendClientMessage(killerid, -1"Congratulation!You have gained 4000$ and +2 score.");
    
SetPlayerScore(playeridGetPlayerScore(playerid) -1);
    
GivePlayerMoney(playerid, -2000);
    
SendClientMessage(playerid, -1"You lost 2000$ because you got killed.");
    
SendDeathMessage(killeridplayeridreason);
    }
    return 
1;

Reply
#5

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;
}
Reply
#6

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
Reply
#7

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)