25.07.2012, 15:59
[help] need help !!
25.07.2012, 16:04
SendDeathMessage. You should have this under OnPlayerDeath:
pawn Код:
SendDeathMessage(killerid, playerid, reason);
25.07.2012, 16:19
^ What he said.
25.07.2012, 18:06
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;
}
25.07.2012, 18:09
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;
}
25.07.2012, 18:32
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
why and how can i fix it
25.07.2012, 21:35
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
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;
}
« Next Oldest | Next Newest »
Users browsing this thread: 1 Guest(s)