Offline Prison help
#1

If you /oprison someone, you will see the text, that the player is prisoned, but if the player logs in, he is not prisoned

pawn Код:
CMD:oprison(playerid, params[])
{
    new playerb[32], string[128], file[32], time;
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    if(PlayerInfo[playerid][pAdmin] < 3) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
    if(sscanf(params, "s[32]is[128]", playerb, time, params)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /oprison [playername] [time] [reason]");
    if(RPIDFN(playerb) != INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "Player is connected to the server, use /prison instead.");
    format(file, sizeof(file), "users/%s.ini", playerb);
    if(!dini_Exists(file)) return SendClientMessage(playerid, COLOR_GREY, "Player name not found.");
    if(PlayerInfo[playerid][pAdmin] < dini_Int(file, "Admin")) return SendClientMessage(playerid, COLOR_GREY, "Player has a higher admin level than you.");
    format(string, sizeof(string), "AdmCmd: %s has been offline-prisoned by %s, reason: %s", playerb, RPN(playerid), params);
    SendClientMessageToAll(COLOR_LIGHTRED, string);
    format(string, sizeof(string), "AdmCmd: %s has been offline-prisoned by %s, reason: %s", playerb, RPN(playerid) , params);
    // Prisoning
    dini_IntSet(file, "pPrison", 1);
    // Prisonreason
    dini_Set(file, "pPrisonReason", params);
    dini_Set(file, "pPrisonBy", RPNU(playerid));
    dini_IntSet(file, "pPrisonTime", time);
    return 1;
}
Reply


Messages In This Thread
Offline Prison help - by lulo356 - 17.05.2014, 23:38
Re: Offline Prison help - by Ciandlah - 18.05.2014, 02:12
Re: Offline Prison help - by lulo356 - 18.05.2014, 12:07
AW: Offline Prison help - by rospar - 18.05.2014, 12:43
Re: Offline Prison help - by lulo356 - 18.05.2014, 12:55
Re: Offline Prison help - by lulo356 - 20.05.2014, 15:56
Re: Offline Prison help - by Rittik - 20.05.2014, 16:25

Forum Jump:


Users browsing this thread: 5 Guest(s)