Need help with offline ban.
#1

<fixed>
Reply
#2

pawn Код:
CMD:osuspend(playerid,params[])
{
    new string[124], string1[124], string2[124] ,reason[64];
    if(!(PlayerInfo[playerid][pAdmin] >= 1)) return SCM(playerid, COLOR_LIGHTRED,"You are not authorized to use this command");
    format(string,sizeof(string),"Users/%s.ini",params);
    if(fexist(string))
    {
        new INI:File = INI_Open(string);
        INI_SetTag(File,"data");
        INI_WriteInt(File,"Ban", 1);
        INI_Close(File);
        // PlayerInfo[playerid][pBan] = 1; // I don't know why you have this?
        format(string1, sizeof(string1), "{FF0000}[Admin-Warning]{FF6347} %s has been o-suspended by %s: %s .", params, GetPlayerNameEx(playerid), reason);
        SendClientMessageToAll(playerid,string1);
        format(string2, sizeof(string2), "{FFFF33}[Admin-Info]{FF0000}: {FFFFFF}%s has Offline-Suspended %s :%s.", GetPlayerNameEx(playerid), params ,reason);
        AdminBroadCast(COLOR_LIGHTRED, string2);
    }
    else SendClientMessage(playerid,-1,"Account not found");
    return 1;
}
Reply
#3

i was just trying to add and tesing it.But doesnt works and forgot to remove that when posting this.
Reply
#4

Did you try the one I posted?
INI_Open(string);
Reply
#5

Quote:
Originally Posted by cosbraa
Посмотреть сообщение
Did you try the one I posted?
INI_Open(string);
lol just noticed.
Reply
#6

Works..Thanks dude...
Reply
#7

Can help me remove you comment
The one you help me edit.
Reply
#8

Help you remove the comment? What do you mean?
pawn Код:
CMD:osuspend(playerid,params[])
{
    new string[124], string1[124], string2[124] ,reason[64];
    if(!(PlayerInfo[playerid][pAdmin] >= 1)) return SCM(playerid, COLOR_LIGHTRED,"You are not authorized to use this command");
    format(string,sizeof(string),"Users/%s.ini",params);
    if(fexist(string))
    {
        new INI:File = INI_Open(string);
        INI_SetTag(File,"data");
        INI_WriteInt(File,"Ban", 1);
        INI_Close(File);
        format(string1, sizeof(string1), "{FF0000}[Admin-Warning]{FF6347} %s has been o-suspended by %s: %s .", params, GetPlayerNameEx(playerid), reason);
        SendClientMessageToAll(playerid,string1);
        format(string2, sizeof(string2), "{FFFF33}[Admin-Info]{FF0000}: {FFFFFF}%s has Offline-Suspended %s :%s.", GetPlayerNameEx(playerid), params ,reason);
        AdminBroadCast(COLOR_LIGHTRED, string2);
    }
    else SendClientMessage(playerid,-1,"Account not found");
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)