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


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)