How to "switch"
#1

Hello guys, I have some problem.
I know the code bellow i can write in switch, but i don't know how...

Код:
new string[128], Nick[MAX_PLAYER_NAME];
	GetPlayerName(playerid, Nick, sizeof(Nick));
	if(Player[playerid][pAdminLevel] == 3)
	{
		format(string, sizeof(string), "(Junior Admin ID:%d): %s",playerid, text);
		SendPlayerMessageToAll(playerid, string);
	}
	if(Player[playerid][pAdminLevel] == 4)
	{
		format(string, sizeof(string), "(Admin ID:%d): %s",playerid, text);
		SendPlayerMessageToAll(playerid, string);
	}
	if(Player[playerid][pAdminLevel] == 5)
	{
	    format(string,sizeof(string), "(Head Admin ID:%d): %s", playerid, text);
	    SendPlayerMessageToAll(playerid, string);
	}
	else
	{
		format(string, sizeof(string), "(ID:%d): %s", playerid, text);
	 	SendPlayerMessageToAll(playerid, string);
	}
Greetings, micol.
Reply


Messages In This Thread
How to "switch" - by micol - 07.01.2013, 15:25
Re: How to "switch" - by gtakillerIV - 07.01.2013, 15:38
Re: How to "switch" - by AndreT - 07.01.2013, 15:44
Re: How to "switch" - by micol - 07.01.2013, 19:59
Re: How to "switch" - by gtakillerIV - 08.01.2013, 17:14
Re: How to "switch" - by micol - 09.01.2013, 11:44

Forum Jump:


Users browsing this thread: 1 Guest(s)