From dini to y_ini help
#1

GO TO PAGE 2 TO GET MORE INFORMATION
Reply
#2

Anyone realy need help!
Reply
#3

im Coding it please wait...
Reply
#4

Ok man Thanks!
Reply
#5

PHP Code:
CMD:unban(playeridparams[]) {
    if (
PlayerInfo[playerid][AdminLevel] >= 3) {
        new 
PlayerFile[50];
        if(
sscanf(params"u[50]",PlayerFile)) return SendClientMessage(playeridCOLOR_RED"USAGE: /unban <account>");
        
format(PlayerFilesizeof(PlayerFile), "/%s.ini"params);
        if(
fexists(PlayerFile)) return SendClientMessage(playeridCOLOR_RED"ERROR: Player is not registered.");
        new 
BanState;
        
INI_Load(PlayerFile);
        
INI:PlayerFile[](name[], value[])
        {
            
INI_String("Banned"BanState);
        }
        if(
BanState 0) return SendClientMessage(playeridCOLOR_RED"ERROR: Account is not marked as banned, unable to proceed with unbanning.");
        new 
INI:TheFile INI_Open(PlayerFile);
        
INI_WriteInt(TheFile,"Banned",0);
        
INI_Close(TheFile);
        
format(szStringsizeof(szString), "AdminCmd:If You Know '%s' Tell Him That He/She Has been unbanned By An Admin.."params);
        
SendClientMessage(playeridCOLOR_GREENszString);
        
format(szStringsizeof(szString), "Admin %s, (%d) has unbanned Account: %s"params);
        
SendClientMessageToAdmins(szString);
    }
    else {
        return 
0;
    }
    return 
1;

Try this and inform me please!
Reply
#6

Well here:
pawn Code:
CMD:unban(playerid, params[]) {
    if (pInfo[playerid][pAdmin] >= 3) {
        if(sscanf(params, "u[50]",PlayerPath)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /unban <account>");
        format(PlayerPath, sizeof(PlayerPath), "/%s.ini", params);
        if(fexists(PlayerPath)) return SendClientMessage(playerid, COLOR_RED, "ERROR: Player is not registered.");
        new BanState;
        INI_Load(PlayerPath);
        INI:PlayerPath[](name[], value[])
        {
            INI_String("Banned"BanState);
        }
        if(BanState = 0) return SendClientMessage(playerid, COLOR_RED, "ERROR: Account is not marked as banned, unable to proceed with unbanning.");
        new INI:TheFile = INI_Open(PlayerFile);
        INI_WriteInt(TheFile,"Banned",0);
        INI_Close(TheFile);
        format(szString, sizeof(szString), "AdminCmd:If You Know '%s' Tell Him That He/She Has been unbanned By An Admin..", params);
        SendClientMessage(playerid, COLOR_GREEN, szString);
    }
    else {
        return 0;
    }
    return 1;
}
and get errors:
Quote:

C:\Documents and Settings\Ћeljko\Desktop\SA-MP Server\gamemodes\server.pwn(1661) : error 076: syntax error in the expression, or invalid function call
C:\Documents and Settings\Ћeljko\Desktop\SA-MP Server\gamemodes\server.pwn(1662) : error 076: syntax error in the expression, or invalid function call
C:\Documents and Settings\Ћeljko\Desktop\SA-MP Server\gamemodes\server.pwn(1662) : error 072: "sizeof" operator is invalid on "function" symbols
C:\Documents and Settings\Ћeljko\Desktop\SA-MP Server\gamemodes\server.pwn(1663) : error 017: undefined symbol "fexists"
C:\Documents and Settings\Ћeljko\Desktop\SA-MP Server\gamemodes\server.pwn(1665) : error 076: syntax error in the expression, or invalid function call
C:\Documents and Settings\Ћeljko\Desktop\SA-MP Server\gamemodes\server.pwn(1666) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Ћeljko\Desktop\SA-MP Server\gamemodes\server.pwn(1666) : error 017: undefined symbol "@INI_PlayerPath_"
C:\Documents and Settings\Ћeljko\Desktop\SA-MP Server\gamemodes\server.pwn(1666) : error 017: undefined symbol "@INI_PlayerPath_"
C:\Documents and Settings\Ћeljko\Desktop\SA-MP Server\gamemodes\server.pwn(1666) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


9 Errors.

Reply
#7

oh god, sorry for this i tried to help but im newbie with Y_INI.
Reply
#8

Anyone else please help me!
Reply
#9

Anyone i realy need this please help!
Reply
#10

where is the original code in dini?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)