14.07.2015, 19:32
Try this:
Код:
//here you set on crime playerid,how i see in this cmd you set wanted level for id CMD:makewanted(playerid,params[]) { new id, reason[80], string[50]; if(sscanf(params, "us[80]",id ,reason)) return SendClientMessage(playerid,-1,"USAGE: /report <PlayerID/Part of Name> <Reason>"); if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "Player Not connected"); format(PlayerInfo[id][pCrimes], 80, reason); new INI:File = INI_Open(UserPath(id)); INI_WriteString(File,"Crimes",PlayerInfo[id][pCrimes]); INI_Close(File); format(string, sizeof(string), "Crime %s saved", reason); SendClientMessage(playerid, -1, string); return 1; } //if you load player when he connect,you dont need to load him again in this command CMD:wanted(playerid,params[]) { new string[128]; format(string, sizeof(string), "Your current crimes: %s", PlayerInfo[playerid][pCrimes]); SendClientMessage(playerid, -1, string); return 1; }