20.10.2013, 09:26
Quote:
Yes i want
/givescore <PlayerId/Name> <Score> to set score even he is offline! |
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;
}