little help
#1

i have this code but given me one error how t o fix it?
PHP код:
if(fexist(filestring) && (dini_Int(File,"Admin") >= 1)) return SendClientMessage(playeridCOLOR_RED"[Error]: You can not use offline ban on admins!"); 
PHP код:
C:\Users\Aref\Desktop\Aref\sampserver\pawno\CODv2.pwn(3072) : error 035argument type mismatch (argument 1
Reply
#2

Remove the double ' ) ' on the end of >= 1, There should be only one ).
Reply
#3

Quote:
Originally Posted by GeneralAref
Посмотреть сообщение
i have this code but given me one error how t o fix it?
PHP код:
if(fexist(filestring) && (dini_Int(File,"Admin") >= 1)) return SendClientMessage(playeridCOLOR_RED"[Error]: You can not use offline ban on admins!"); 
PHP код:
C:\Users\Aref\Desktop\Aref\sampserver\pawno\CODv2.pwn(3072) : error 035argument type mismatch (argument 1
Код:
if(fexist(filestring)) && (dini_Int(File,"Admin") >= 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You can not use offline ban on admins!")
Reply
#4

not works:
PHP код:
if(fexist(filestring) && dini_Int(File,"Admin") >= 1) return SendClientMessage(playeridCOLOR_RED"[Error]: You can not use offline ban on admins!"); 
Reply
#5

Maybe the problem is the colour.
Try this
PHP код:
if(fexist(filestring) && dini_Int(File,"Admin") >= 1)) return SendClientMessage(playerid0xFF0000AA"[Error]: You can not use offline ban on admins!"); 
BTW, there's nothing wrong with his closing brackets I guess.
Reply
#6

Try this.

PHP код:
if(fexist(filestring) && dini_Int(File,"Admin") >= 1)) return SendClientMessage(playeridCOLOR_RED"[Error]: You can not use offline ban on admins!"); 
Reply
#7

this is full code:
PHP код:
CMD:oban(playeridparams[])
{
    if(
PlayerInfo[playerid][pAdmin] == CmdsOptions[oban] || IsPlayerAdmin(playerid))
    {
        new 
targetname[24], filestring[79], adminname[MAX_PLAYER_NAME];
        if(
sscanf(params"s[24]"targetname)) return SendClientMessage(playeridCOLOR_RED"USAGE: /oban [Player's Name]");
        
format(filestringsizeof(filestring), "/Asystem/Users/%s.ini"targetname);
        if(!
fexist(filestring)) return SendClientMessage(playeridCOLOR_RED"[Error]: The player name you have chosen was not found in our system.");
        else
        {
            
GetPlayerName(playeridadminnamesizeof(adminname));
            new 
INI:File INI_Open(filestring);
            
INI_SetTag(File"data");
            
INI_WriteInt(File"Ban"1);
            
INI_Close(File);
            new 
done[128];
            
format(donesizeof(done), "[BAN] Admin %s (id:%d) Offlinebanned %s from server."adminnameplayeridtargetname);
            
SendClientMessageToAll(COLOR_REDdone);
            
printf("[BAN] Admin %s (id:%d) Offlinebanned %s from server."adminnameplayeridtargetname);
            return 
1;
        }
    }
    else return 
SendClientMessage(playerid,COLOR_RED,"You do not have permission to use this command!");

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)