Код:
CMD:setkills(playerid,params[])
{
new userid, kills;
if(sscanf(params, "ui", userid, kills))
return SendClientMessage(playerid, COLOR_RED, "Syntax: /setkills [playerid/partofname] [level]");
if(!IsPlayerConnected(userid))
return SendClientMessage(playerid, COLOR_RED, "That user is offline!");
}
I'm working on a small command right now (Obviously not finished) that basically sets a player's kills to 'x' amount. How can I have Y_INI save that via this command? So let's say in game I did /setkills 1 (part of name or playerid in this case) 300, how would it save into my Y_INI file? I have an enum defined and pKills is part of it. I've made other commands with something like PlayerInfo[playerid][pCrack]++; or += 2; or something else along those lines. I guess how can I make something like that, but case specific to what the user types in game? Y_INI is still confusing to me, so thanks to anyone that is able to understand what I'm saying and perhaps offer me some help.