How Would I Do A Setscore Command - DCMD Please?
#6

its meant to be the command like /setscore [id] [score]

Like this

pawn Код:
dcmd_setscore(playerid, params[])
{
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "[ERROR]No Such Command :D");
    new Target, Level;
    if(!sscanf(params, "ui", Target, Level))
    {
        new string[128], string1[128], myname[24], targetname[24];
        GetPlayerName(playerid, myname, 24);GetPlayerName(Target, targetname, 24);
        SetPlayerScoreEx(playerid,AMOUNT);
        format(string, sizeof string, "Admin Has Changed Your Score ", myname);
        format(string1, sizeof string1, "You changed %s's score. ", targetname);
        SendClientMessage(playerid, -1, string1);
        SendClientMessage(Target, -1, string);
    } else return SendClientMessage(playerid, -1, "Usage: /setscore [playerid] [score]");
    return 1;
}
Where 'AMOUNT' Is i want it to be literally what score you want it set to...

Like this

Their score is 150, you do /setscore id 1

Their score will then be set to 1

then you do
/setscore id 40008

their score will now be 40008
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)