Command help
#5

Quote:
Originally Posted by ignas1125
Посмотреть сообщение
Yes i want
/givescore <PlayerId/Name> <Score> to set score even he is offline!
What saving system are you using?, Never mind I saw you using (dini), Code in Progress

Code should look something like this
pawn Код:
CMD:setscore(playerid, params[])
{
    new
        pName [ 24 ],
        ScoreAmount,
        AccountFile [ 70 ],
        string [ 90 ]
    ;
    if(sscanf(params, "s[24]", pName, ScoreAmount)) return SendClientMessage(playerid, -1, "/setscore [PlayerName] [Score Amount]");

    format(AccountFile, sizeof(AccountFile), Your_Path, pName); //Your_Path should look something like this Users/pds2k12.ini but instead of name you put %s

    if(!dini_Exists(AccountFile)) return format(string, sizeof(string), "There is an issue locating '%s' in the database.", pName), SendClientMessage(playerid, -1, string);
   
    if(dini_Exists(AcountFile))
    {
        dini_IntSet(AcountFile, "Score", ScoreAmount);
    }
    return 1;
}
Reply


Messages In This Thread
Command help - by ignas1125 - 19.10.2013, 20:49
Re: Command help - by ignas1125 - 20.10.2013, 06:17
Re: Command help - by kbalor - 20.10.2013, 06:25
Re: Command help - by ignas1125 - 20.10.2013, 09:23
Re: Command help - by Patrick - 20.10.2013, 09:26
Re: Command help - by ignas1125 - 20.10.2013, 09:52
Re: Command help - by EiresJason - 20.10.2013, 09:54
Re: Command help - by ignas1125 - 20.10.2013, 10:00
Re: Command help - by DanishHaq - 20.10.2013, 10:04
Re: Command help - by ignas1125 - 20.10.2013, 10:07

Forum Jump:


Users browsing this thread: 1 Guest(s)