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
#2

Change
Код:
public OnGameModeInit()
{
	SetGameModeText("LAD-RP V1.0");
	skinlist = LoadModelSelectionMenu("skins.txt");
	Create3DTextLabel("Welcome to Los Angeles Deathless Roleplay!\r\nUse the command /tutorial to watch the tutorial!", 0x0000000, 2695.6646, -1704.6169, 11.8438, 40.0, 0, 1);
	return 1;
}
To

Код:
public OnGameModeInit()
{
	SetGameModeText("LAD-RP V1.0");
	skinlist = LoadModelSelectionMenu("skins.txt");
        Create3DTextLabel("Welcome to Los Angeles Deathless Roleplay!{FF0000}\nUse the command /tutorial to watch the tutorial!", 0x00FF00FF,2695.6646, -1704.6169, 11.8438, 40.0, 0, 1);
	return 1;
}
Reply
#3

PHP код:
Create3DTextLabel("Welcome to Los Angeles Deathless Roleplay!\nUse the command /tutorial to watch the tutorial!"0x00000002695.6646, -1704.616911.843840.001); 
Try this.
Reply
#4

Thanks both of you, Plus rep to each one even though @TwinkiDaBoss didn't work.
Reply
#5

Quote:
Originally Posted by Meller
Посмотреть сообщение
Thanks both of you, Plus rep to each one even though @TwinkiDaBoss didn't work.
Ohh thanks, tell me if got any problems again or post on here
Reply
#6

Quote:
Originally Posted by SilverStand
Посмотреть сообщение
You're welcome, tell me if got any problems again or post on here
Hmmm I wonder why.. Mine works just fine that way. Oh well thanks mate, ill rep u too then because u gave me an honest response
Reply
#7

Another problem;
Hi..
I need a system using the params, Such as
/admin fine playerid price reason

My current code is;
pawn Код:
CMD:admin(playerid, params[])
{
    if(LoggedIn[playerid] == 1)
    {
        if(PlayerInfo[playerid][pAdmin] >= 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;
}
How do I use the params to check if the admin wrote fine?
Reply
#8

Like this??

Код:
PERINTAH:set(playerid, params[])
{
	if(playerData[playerid][playerLoggedIn])
	{
		if(IsPlayerAdmin(playerid))
		{
			new otherID, otherName[24], message[128], selection[5], amount, message2[128];
		
			if(sscanf(params, "us[20] i", otherID, selection, amount))
			{
				SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SERVER] {FFFFFF}Usage: \"set <player> <score/money> <amount>\"");
			}
			else
			{
				if(IsPlayerConnected(otherID))
				{
					if(playerData[otherID][playerLoggedIn])
					{
						GetPlayerName(otherID, otherName, sizeof(otherName));

						if(!strcmp(selection, "score", true))
						{
							playerData[otherID][playerScore] = amount;
							SetPlayerScore(otherID, playerData[otherID][playerScore]);
							format(message, sizeof(message), "{B7B7B7}[RCON] {FFFFFF}You set {FFDC2E}%s's {FFFFFF}score to {FFDC2E}%i", otherName, amount);
							SendClientMessage(playerid, COLOR_WHITE, message);
							
							format(message2, sizeof(message), "{B7B7B7}[INFO] {FFFFFF}Your score has been set to {FFDC2E}%i", amount);
							SendClientMessage(otherID, COLOR_WHITE, message2);
							
							if (playerData[playerid][playerLevel] != 7)
							{
								new log[250];
								format(log, sizeof(log), "%s(%i) set %s(%i)'s score to %i", playerData[playerid][tempAdminName], playerid, otherName, otherID, amount);
								SendAdminText(playerid, log);	
							}
						}
						else if(!strcmp(selection, "money", true))
						{
							playerSetMoney(otherID, amount);
							format(message, sizeof(message), "{B7B7B7}[RCON] {FFFFFF}You set {FFDC2E}%s's {FFFFFF}money to {FFDC2E}$%s", otherName, FormatNumber(amount));
							SendClientMessage(playerid, COLOR_WHITE, message);
							
							format(message2, sizeof(message), "{B7B7B7}[INFO] {FFFFFF}Your money has been set to {FFDC2E}$%s", FormatNumber(amount));
							SendClientMessage(otherID, COLOR_WHITE, message2);
							
							if (playerData[playerid][playerLevel] != 7)
							{
								new log[250];
								format(log, sizeof(log), "%s(%i) set %s(%i)'s money to %s", playerData[playerid][tempAdminName], playerid, otherName, otherID, FormatNumber(amount));
								SendAdminText(playerid, log);	
							}
						}
                                        }
					else
					{
						SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SERVER] {FFFFFF}That player is not logged in!");
					}
				}
				else
				{
					SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SERVER] {FFFFFF}That player is not online!");
				}
			} 
		}
		else
		{
			return 0;
		}
	}
	else
	{
		SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SERVER] {FFFFFF}You must be logged in to use commands.");
	}
		
	return 1;
}
Reply
#9

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


Forum Jump:


Users browsing this thread: 1 Guest(s)