SA-MP Forums Archive
giving scores to noobies - 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: giving scores to noobies (/showthread.php?tid=465568)



giving scores to noobies - zrelly - 22.09.2013

giving scores to people with less than 100 scores.

cmd: /givenoobscore [number of score]
If they have over 100 scores, they wont receieve it.


Re: giving scores to noobies - Ada32 - 22.09.2013

Well, can we see what you've tried?


Re: giving scores to noobies - iJumbo - 22.09.2013

pawn Код:
if(GetPlayerScore(noobplayerid) < 100) {
    SetPlayerScore(noobplayerid,amountofscore);
}



Re: giving scores to noobies - EiresJason - 22.09.2013

Using ZCMD:

pawn Код:
CMD:givenoobscore(playerid,params[])
{
    new targetid,score;
    if(sscanf(params,"ui",targetid,score)) return SendClientMessage(playerid,-1,"USAGE: /givenoobscore [Playerid/PartOfName] [score]");
    new targetscore = GetPlayerScore(targetid);
    if(targetscore >= 100) return SendClientMessage(playerid,-1,"ERROR: Player already is or above a score of 100!");
    else
    {
       SetPlayerScore(targetid,score);
    }
return 1;
}