/check script problem
#3

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.

PHP код:
CMD:check(playeridparams[]) 
{
    if(
sscanf(params"u"params[0])) return SendClientMessage(playerid, -1,"/check [PlayerID]"); 
    new 
P_name[MAX_PLAYER_NAME], string[90];
    
GetPlayerName(params[0], P_nameMAX_PLAYER_NAME); 
    
format(stringsizeof(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(strsizeof(str), "{00FF00}Admin level: {FFFFFF}%i\n"adm); strcat(dialogstr);
    
format(strsizeof(str), "{00FF00}VIP level: {FFFFFF}%i\n"vip); strcat(dialogstr);
    
format(strsizeof(str), "{00FF00}Money:{FFFFFF} %d\n"para); strcat(dialogstr);
    
format(strsizeof(str), "{00FF00}Warns: {FFFFFF}%i/5\n"wa); strcat(dialogstr);
    
format(strsizeof(str), "{00FF00}Admin Warns: {FFFFFF}%i/3\n"aw); strcat(dialogstr);
    
format(strsizeof(str), "{00FF00}Score: {FFFFFF}%i\n"GetPlayerScore(params[0])); strcat(dialogstr);
    
format(strsizeof(str), "{00FF00}Kills: {FFFFFF}%i\n"killsw); strcat(dialogstr);
    
format(strsizeof(str), "{00FF00}Deaths: {FFFFFF}%i\n"deaths); strcat(dialogstr);
    
ShowPlayerDialog(playeriddialog_command+123DIALOG_STYLE_MSGBOX"Express-BG CHECK"dialog"Close"""); 
    return 
1

Reply


Messages In This Thread
/check script problem - by TaligaroW - 01.10.2018, 18:25
Re: /check script problem - by solstice_ - 01.10.2018, 19:29
Re: /check script problem - by Undef1ned - 01.10.2018, 19:50

Forum Jump:


Users browsing this thread: 1 Guest(s)