How do I make it so when a player dies he will lose $1000 and 1 score but when he kills some one he will gain 1000$ and 1 score
EDIT--And how do I make custom Plates, So for example it would say SDK for every vehicle plate?
PHP код:
// OnPlayerDeath
public OnPlayerDeath(playerid, killerid, reason)
{
GivePlayerMoney(playerid, -1000);
SetPlayerScore(playerid, GetPlayerScore(playerid) - 1);
GivePlayerMoney(killerid, 1000);
SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
return 1;
}
// OnGameModeInit
new string[16];
for(new i = 1; i < MAX_VEHICLES; i++)
{
if(i < 10) format(string, 64, "000%d", i);
else if(10 <= i < 100) format(string, 64, "00%d", i);
else if(!(100 > i >= 1000)) format(string, 64, "0%d", i);
else format(string, 64, "%d", i);
strcat(string, " - SDK");
SetVehicleNumberPlate(i, string);
}