Create3DTextLabel
#1

Hello again,
New problem:
Another problem;
Hi..
The format wont show up when ever I use /admin jail etc etc

My current code is;
pawn Код:
CMD:admin(playerid, params[], params2, params3, params4)
{
    if(LoggedIn[playerid] == 1)
    {
        if(PlayerInfo[playerid][pAdmin] >= 1)
        {
            if(strcmp(params, "fine", true) == 0)
            {
                new targetid,
                    price,
                    reason[32];
                if(sscanf(params, "uds[32]", targetid, price, reason))
                {
                    SendClientMessage(playerid, -1, ""Dialog_Color_LightBlue"["Dialog_Color_Red"Error"Dialog_Color_LightBlue"] /Admin Fine Playerid Price Reason.");
                }
                new
                    VBString[128],
                    Admin[MAX_PLAYER_NAME],
                    Name[MAX_PLAYER_NAME];
                GetPlayerName(playerid, Admin, MAX_PLAYER_NAME);
                GetPlayerName(targetid, Name, MAX_PLAYER_NAME);
                format(VBString, 128, ""Dialog_Color_LightBlue"["Dialog_Color_Red"Admin Warning"Dialog_Color_LightBlue"] %s just fined %s for %i$ Reason: %s",Admin, Name, price, reason);
                SendClientMessageToAll(-1,VBString);
                GivePlayerMoney(targetid, -price);
            }
           
            else if(strcmp(params, "jail", true) == 0)
            {
                new pId, time;
                if(sscanf(params, "dds", pId, time, params[4]))
                {
                    SendClientMessage(playerid, 0xFF0000AA, "Usage: /jail [ID] [time in minuets][reason]");
                }
                else if(!IsPlayerConnected(pId))
                {
                    SendClientMessage(playerid, 0xFF0000AA, "The ID You Entered Was Not Found.");
                }
                else
                {
                    new pname[MAX_PLAYER_NAME], jname[MAX_PLAYER_NAME], string1[250];
                    GetPlayerName(playerid, pname, sizeof(pname));
                    GetPlayerName(pId, jname, sizeof(jname));
                    format(string1, sizeof(string1), ""Dialog_Color_LightBlue"["Dialog_Color_Red"Admin Warning"Dialog_Color_LightBlue"] %s just jailed %s for %d seconds, Reason: %s", pname, jname, time, params[4]);
                    SendClientMessageToAll(0xFF0000AA, string1);
                    PlayerInfo[playerid][pJailed] = 1;
                    PlayerInfo[playerid][pJailTime] = time;
                    format(PlayerInfo[playerid][pJailBy], 128, pname);
                    format(PlayerInfo[playerid][pJailReason], 128, params[4]);
                    ResetPlayerWeapons(playerid);
                    return 1;
                }
            }
        }
        else
        {
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(PlayerInfo[i][pAdmin] >= 1)
                {
                    new name[MAX_PLAYER_NAME], string[62+MAX_PLAYER_NAME];
                    GetPlayerName(playerid, name, sizeof(name));
                    format(string, sizeof(string), ""Dialog_Color_LightBlue"["Dialog_Color_Red"Admin Warning"Dialog_Color_LightBlue"] %s just attempted to use the command: /admin.", name);
                    SendClientMessage(i, -1, string);
                }
            }
            SendClientMessage(playerid, -1, ""Dialog_Color_LightBlue"["Dialog_Color_Red"Error"Dialog_Color_LightBlue"] You're not authorized to use this command!");
        }
    }
    else
    {
        SendClientMessage(playerid, -1, ""Dialog_Color_LightBlue"["Dialog_Color_Red"Error"Dialog_Color_LightBlue"] You're not logged in!");
    }
    return 1;
}
Reply


Messages In This Thread
Admin Jail - by Luicy. - 05.12.2015, 09:22
Re: Create3DTextLabel - by SilverStand - 05.12.2015, 10:19
Re: Create3DTextLabel - by TwinkiDaBoss - 05.12.2015, 10:21
Re: Create3DTextLabel - by Luicy. - 05.12.2015, 10:53
Re: Create3DTextLabel - by SilverStand - 05.12.2015, 10:53
Re: Create3DTextLabel - by TwinkiDaBoss - 05.12.2015, 11:00
Re: Create3DTextLabel - by Luicy. - 05.12.2015, 13:35
Re: Create3DTextLabel - by SilverStand - 05.12.2015, 13:41
Re: Create3DTextLabel - by Luicy. - 05.12.2015, 16:57

Forum Jump:


Users browsing this thread: 1 Guest(s)