Setting up commands for admins
#4

Quote:
Originally Posted by [AC
Etch ]
ok i created the command , good luck

Код:
if(strcmp(cmdtext,"/fire", true) == 0) {
		new tmp[256];
		new idx;
		new giveplayerid;
		new string[128];
		if(IsPlayerAdmin(playerid))
		{
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid,0xF97804FF, "USAGE: /fire [name/id]");
				return 1;
			}

			giveplayerid = strval(tmp);
			if(giveplayerid != INVALID_PLAYER_ID)
			{
			gTeam[giveplayerid] = TEAM_FIRE;
			SetPlayerSkin(giveplayerid, 135);
			SetPlayerColor(giveplayerid, 0xFFFFFFAA);
			SendClientMessage(giveplayerid,0xAA0000AA,"You got fired!");
			}
			else if(giveplayerid == INVALID_PLAYER_ID)
			{
				format(string, sizeof(string), "%s is not an active player.", giveplayerid);
				SendClientMessage(playerid, 0xFF0000AA, string);
			}
		}
		else SendClientMessage(playerid, 0xFF0000AA, "You cannot use this command!");
		return 1;
	}
It must be: "%i is not active player"
Reply


Messages In This Thread
Setting up commands for admins - by Assyria - 28.03.2010, 18:41
Re: Setting up commands for admins - by [HiC]TheKiller - 28.03.2010, 18:44
Re: Setting up commands for admins - by aircombat - 28.03.2010, 18:55
Re: Setting up commands for admins - by ¤Adas¤ - 28.03.2010, 19:11
Re: Setting up commands for admins - by Joe_ - 28.03.2010, 19:21
Re: Setting up commands for admins - by aircombat - 28.03.2010, 19:27
Re: Setting up commands for admins - by RyDeR` - 28.03.2010, 20:41
Re: Setting up commands for admins - by [NL]Bank - 28.03.2010, 20:45
Re: Setting up commands for admins - by Joe_ - 28.03.2010, 21:31
Re: Setting up commands for admins - by sammypiv - 29.03.2010, 01:39

Forum Jump:


Users browsing this thread: 2 Guest(s)