26.08.2013, 10:30
The problem has nothing to do with Y_INI. The topic title is misleading. But anyway:
pawn Код:
CMD: setplayerkills(playerid,params[])
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
new id,Jstring[128],kill;
if(sscanf(params, "ui", id, kill)) return
SendClientMessage(playerid, 0xFFFF00C8, "Usage: /Setkills <PlayerID> <kills>") ;
if(IsPlayerConnected(id))
{
SetPlayerScore(id, kill); //I have added this line.
format(Jstring, sizeof(Jstring), "Admin %s has set your kills to '%d'",GetName(playerid),kill);
SendClientMessage(id,blue,Jstring);
format(Jstring,sizeof(Jstring),"You have set %s's kills to %d", GetName(id), kill);
SendClientMessage(playerid,COLOR_YELLOW,Jstring);
return PlayerInfo[id][pKills] = kill;
}
else return SendClientMessage(playerid,blue,"Player is NOT connected!");
}
else return WrongMessage(playerid, COLOR_RED, 1);
}