+1 score by kill - 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: +1 score by kill (
/showthread.php?tid=660890)
+1 score by kill -
Spawe - 16.11.2018
How I give +1 score and $ 300 of money to a user for kill
Variables money and score
PHP Code:
//money
if(GetPlayerMoney(playerid) != PlayerInfo[playerid][cDinero])
GivePlayerMoney(playerid,PlayerInfo[playerid][cDinero]);}
//score
if(GetPlayerScore(playerid) != PlayerInfo[playerid][cKills]){
SetPlayerScore(playerid,PlayerInfo[playerid][cKills]);}
Re: +1 score by kill -
v1k1nG - 16.11.2018
PHP Code:
static money, score;
money = 300;
score = 1;
//money
if(GetPlayerMoney(playerid) != PlayerInfo[playerid][cDinero]){
GivePlayerMoney(playerid, money);
PlayerInfo[playerid][cDinero] += money;}
//score
if(GetPlayerScore(playerid) != PlayerInfo[playerid][cKills]){
PlayerInfo[playerid][cKills] += 1;
SetPlayerScore(playerid,PlayerInfo[playerid][cKills]);}