Need help in /giveallscore (rep++)
#7

try this:


Код:
dcmd_givescore(playerid, params[])
{
    new giveplayerid,
        amount,
        gscore = GetPlayerScore(playerid);
    if(sscanf(params, "ud", giveplayerid, amount)) return SendClientMessage(playerid, 0xFF0000AA, "USAGE: /givescore [playerid/partname] [amount]");
    else if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, 0xFF0000AA, "ERROR: Player not found");
    else if(amount > gscore) return SendClientMessage(playerid, 0xFF0000AA, "ERROE:Unknown Score");
    else
    {
        SetPlayerScore(giveplayerid,GetPlayerScore(giveplayerid) + amount);
        SetPlayerScore(playerid,gscore - amount);
        SendClientMessage(playerid, 0x00FF00AA, "Score Sent");
        SendClientMessage(giveplayerid, 0x00FF00AA, "You Recieved Score");
    }
    return 1;
}
Reply


Messages In This Thread
Need help in /giveallscore (rep++) - by iOmar - 29.04.2012, 07:19
Re: Need help in /giveallscore (rep++) - by Crazymax - 29.04.2012, 07:22
Re: Need help in /giveallscore (rep++) - by iOmar - 29.04.2012, 08:12
Re: Need help in /giveallscore (rep++) - by JaKe Elite - 29.04.2012, 08:27
Re: Need help in /giveallscore (rep++) - by $$inSane - 29.04.2012, 08:38
Re: Need help in /giveallscore (rep++) - by Mean - 29.04.2012, 08:40
Re: Need help in /giveallscore (rep++) - by $$inSane - 29.04.2012, 08:42
Re: Need help in /giveallscore (rep++) - by Mean - 29.04.2012, 08:44
Re: Need help in /giveallscore (rep++) - by iOmar - 29.04.2012, 10:07

Forum Jump:


Users browsing this thread: 2 Guest(s)