PDA

View Full Version : giving scores to noobies


zrelly
22/09/2013, 10:10 PM
giving scores to people with less than 100 scores.

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

Ada32
22/09/2013, 10:25 PM
Well, can we see what you've tried?

iJumbo
22/09/2013, 10:25 PM
if(GetPlayerScore(noobplayerid) < 100) {
SetPlayerScore(noobplayerid,amountofscore);
}

EiresJason
22/09/2013, 10:27 PM
Using ZCMD:


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;
}