[HELP]
#10

Quote:
Originally Posted by Gamer007

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if(strcmp(cmdtext, "/makeadmin", true) == 0)
{
if (PlayerInfo[playerid][pAdminLevel] == 5 || IsPlayerAdmin(playerid))
	{
	tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, ORANGE, "USAGE: /makeadmin [playerid] [level 1-5]");
			SendClientMessage(playerid, ORANGE, "FUNCTION: Player will be an admin. **PLEASE ENTER THE ID ONLY!**");
			return 1;
		}
		giveplayerid = ReturnUser(tmp);
		tmp = strtok(cmdtext, idx);
		level = strval(tmp);
		if(giveplayerid != INVALID_PLAYER_ID)
		{
				GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
				GetPlayerName(playerid, sendername, sizeof(sendername));
				PlayerInfo[giveplayerid][pAdminLevel] = level;
				printf("[ADMIN NEWS]: %s made %s a level %d admin.", sendername, giveplayer, level);
				format(string, sizeof(string), "You are now an administrator level %d thanks to %s.", level, sendername);
				SendClientMessage(giveplayerid, LIGHTBLUE, string);
				format(string, sizeof(string), "You have given %s level %d admin.", giveplayer,PlayerInfo[giveplayerid][pAdminLevel]);
				SendClientMessage(playerid, LIGHTBLUE, string);
		}
		else if(giveplayerid != INVALID_PLAYER_ID)
		{
			format(string, sizeof(string), "%d is not an active player.", giveplayerid);
			SendClientMessage(playerid, RED, string);
		}
	}
	else
	{
	SendClientMessage(playerid, RED, "You are not a lead admin!");
	}
return 1;
}
OMGPawno Is ill
pawn Код:
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(30) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(30) : warning 215: expression has no effect
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(30) : warning 215: expression has no effect
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(30) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(30) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(30) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
of the code of you -.-
Reply


Messages In This Thread
[HELP] - by luckie12 - 12.05.2009, 13:30
Re: [HELP] - by luckie12 - 12.05.2009, 14:27
Re: [HELP] - by Klutty - 12.05.2009, 14:30
Re: [HELP] - by luckie12 - 12.05.2009, 14:38
Re: [HELP] - by Think - 12.05.2009, 14:38
Re: [HELP] - by luckie12 - 12.05.2009, 14:43
Re: [HELP] - by Think - 12.05.2009, 14:45
Re: [HELP] - by luckie12 - 12.05.2009, 14:46
Re: [HELP] - by Gamer007 - 12.05.2009, 14:48
Re: [HELP] - by luckie12 - 12.05.2009, 14:50

Forum Jump:


Users browsing this thread: 1 Guest(s)