01.10.2018, 19:50
I recommend that you load the players' data every time they log in, so you do not have to be loading a player's data in each command.
Also learn some basic pawn tutorials so you have a little more knowledge.
Also learn some basic pawn tutorials so you have a little more knowledge.
PHP код:
CMD:check(playerid, params[])
{
if(sscanf(params, "u", params[0])) return SendClientMessage(playerid, -1,"/check [PlayerID]");
new P_name[MAX_PLAYER_NAME], string[90];
GetPlayerName(params[0], P_name, MAX_PLAYER_NAME);
format(string, sizeof(string), "%s.ini", P_name);
new adm = dini_Int(string, "Admin");
new vip = dini_Int(string, "Vip");
new para = dini_Int(string, "Pari");
new wa = dini_Int(string, "Warns");
new aw = dini_Int(string, "AWarns");
new killsw = dini_Int(string, "Kills");
new deaths = dini_Int(string, "Deaths");
new str[145], dialog[850];
format(str, sizeof(str), "{00FF00}Admin level: {FFFFFF}%i\n", adm); strcat(dialog, str);
format(str, sizeof(str), "{00FF00}VIP level: {FFFFFF}%i\n", vip); strcat(dialog, str);
format(str, sizeof(str), "{00FF00}Money:{FFFFFF} %d\n", para); strcat(dialog, str);
format(str, sizeof(str), "{00FF00}Warns: {FFFFFF}%i/5\n", wa); strcat(dialog, str);
format(str, sizeof(str), "{00FF00}Admin Warns: {FFFFFF}%i/3\n", aw); strcat(dialog, str);
format(str, sizeof(str), "{00FF00}Score: {FFFFFF}%i\n", GetPlayerScore(params[0])); strcat(dialog, str);
format(str, sizeof(str), "{00FF00}Kills: {FFFFFF}%i\n", killsw); strcat(dialog, str);
format(str, sizeof(str), "{00FF00}Deaths: {FFFFFF}%i\n", deaths); strcat(dialog, str);
ShowPlayerDialog(playerid, dialog_command+123, DIALOG_STYLE_MSGBOX, "Express-BG CHECK", dialog, "Close", "");
return 1;
}