18.01.2015, 22:56
how to add here when player kill player he got 100 $
Код:
SendDeathMessage(killerid, playerid, reason); new cash = random(100); format(gString, 100, "You have killed %s and got $%d and + 1 score!", PlayerName(playerid), cash); SendClientMessage(killerid, GREEN, gString); format(gString, 100, "You have been killed by %s!", PlayerName(killerid)); SendClientMessage(playerid, RED, gString); SetPlayerScore(killerid,GetPlayerScore(killerid)+1); GivePlayerMoney(playerid, cash); pInfo[playerid][Spawned] = 0; pInfo[playerid][Deaths]++; if(IsPlayerConnected(killerid) && killerid != INVALID_PLAYER_ID) { pInfo[killerid][Kills]++; } return 1; }