Need a help with this thing :(
#1

Код:
sendername = GetPlayerNameEx(playerid);

	switch(PlayerInfo[playerid][pAccent])
	{
		case 0, 1:
		{
		    if(AdminDuty[playerid] == 1)
				format(string, sizeof(string), "%s says: (( %s )) ", sendername, text);
			else
			    format(string, sizeof(string), "%s says: %s", sendername, text);
			
			for(new i = 0; i < MAX_PLAYERS; i++)
			{
				if(BigEar[i] == 1){
					ProxDetector(999999.0, playerid,string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
			}
			else
				ProxDetector(20.0, playerid,string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
				SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);

		}
Код:
C:\Users\Cris\Desktop\0.3z Server\ASRP \gamemodes\ASRP_V2.0.pwn(48347) : warning 217: loose indentation
C:\Users\Cris\Desktop\0.3z Server\ASRP \gamemodes\ASRP_V2.0.pwn(48352) : warning 217: loose indentation
C:\Users\Cris\Desktop\0.3z Server\ASRP \gamemodes\ASRP_V2.0.pwn(48352) : error 014: invalid statement; not in switch
C:\Users\Cris\Desktop\0.3z Server\ASRP \gamemodes\ASRP_V2.0.pwn(48352) : warning 215: expression has no effect
C:\Users\Cris\Desktop\0.3z Server\ASRP \gamemodes\ASRP_V2.0.pwn(48352) : error 001: expected token: ";", but found ":"
C:\Users\Cris\Desktop\0.3z Server\ASRP \gamemodes\ASRP_V2.0.pwn(48352) : error 029: invalid expression, assumed zero
C:\Users\Cris\Desktop\0.3z Server\ASRP \gamemodes\ASRP_V2.0.pwn(48352) : fatal error 107: too many error messages on one line
Код:
Line 48347: else
48352: case 2:
FULL CODE:
Код:
	sendername = GetPlayerNameEx(playerid);

	switch(PlayerInfo[playerid][pAccent])
	{
		case 0, 1:
		{
		    if(AdminDuty[playerid] == 1)
				format(string, sizeof(string), "%s says: (( %s )) ", sendername, text);
			else
			    format(string, sizeof(string), "%s says: %s", sendername, text);
			
			for(new i = 0; i < MAX_PLAYERS; i++)
			{
				if(BigEar[i] == 1){
					ProxDetector(999999.0, playerid,string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
			}
			else
				ProxDetector(20.0, playerid,string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
				SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);

		}
		case 2:
		{
			format(string, sizeof(string), "(British accent) %s says: %s", sendername, text);
			ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
			SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
		}
		case 3:
		{
			format(string, sizeof(string), "(Asian accent) %s says: %s", sendername, text);
			ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
			SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
		}
		case 4:
		{
			format(string, sizeof(string), "(Scottish accent) %s says: %s", sendername, text);
			ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
			SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
		}
		case 5:
		{
			format(string, sizeof(string), "(Irish accent) %s says: %s", sendername, text);
			ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
			SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
		}
		case 6:
		{
			format(string, sizeof(string), "(Russian accent) %s says: %s", sendername, text);
			ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
			SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
		}
		case 7:
		{
			format(string, sizeof(string), "(American accent) %s says: %s", sendername, text);
			ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
			SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
		}
		case 8:
		{
			format(string, sizeof(string), "(Spanish accent) %s says: %s", sendername, text);
			ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
			SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
		}
		case 9:
		{
			format(string, sizeof(string), "(Southern Accent) %s says: %s", sendername, text);
			ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
			SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
		}
		case 10:
		{
			format(string, sizeof(string), "(Cuban accent) %s says: %s", sendername, text);
			ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
			SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
		}
		case 11:
		{
			format(string, sizeof(string), "(Italian accent) %s says: %s", sendername, text);
			ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
			SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
		}
		case 12:
		{
			format(string, sizeof(string), "(Gangster accent) %s says: %s", sendername, text);
			ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
			SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
		}
		case 13:
		{
			format(string, sizeof(string), "(Australian accent) %s says: %s", sendername, text);
			ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
			SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
		}
		case 14:
		{
			format(string, sizeof(string), "(Arabic accent) %s says: %s", sendername, text);
			ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
			SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
		}
		case 15:
		{
			format(string, sizeof(string), "(Balkan accent) %s says: %s", sendername, text);
			ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
			SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
		}
		case 16:
		{
			format(string, sizeof(string), "(Canadian accent) %s says: %s", sendername, text);
			ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
			SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
		}
		case 17:
		{
			format(string, sizeof(string), "(Jamaican accent) %s says: %s", sendername, text);
			ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
			SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
		}
		case 18:
		{
			format(string, sizeof(string), "(Israeli accent) %s says: %s", sendername, text);
			ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
			SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
		}
		case 19:
		{
			format(string, sizeof(string), "(Indian accent) %s says: %s", sendername, text);
			ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
			SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
		}
		case 20:
		{
			format(string, sizeof(string), "(Welsh accent) %s says: %s", sendername, text);
			ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
			SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
		}
		case 21:
		{
			format(string, sizeof(string), "(French accent) %s says: %s", sendername, text);
			ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
			SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
		}
		case 22:
		{
			format(string, sizeof(string), "(German accent) %s says: %s", sendername, text);
			ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
			SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
		}
		case 23:
		{
			format(string, sizeof(string), "(Dutch accent) %s says: %s", sendername, text);
			ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
			SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
		}
		case 24:
		{
			format(string, sizeof(string), "(South African accent) %s says: %s", sendername, text);
			ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
			SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
		}
		case 25:
		{
			format(string, sizeof(string), "%s says: %s", sendername, text);
			ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
			SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
		}
	}
	if(PlayerInfo[playerid][pBugged] == 1)
	{
		format(string, sizeof(string), "(bug) %s: %s", GetPlayerNameEx(playerid), text);
		SendBugMessage(2, COLOR_LIGHTGREEN, string);
	}
	return 0;
}
Reply
#2

pawn Код:
sendername = GetPlayerNameEx(playerid);

    switch(PlayerInfo[playerid][pAccent])
    {
        case 0..1:
        {
            if(AdminDuty[playerid] == 1)
            {
                format(string, sizeof(string), "%s says: (( %s )) ", sendername, text);
            }
            else
            {
                format(string, sizeof(string), "%s says: %s", sendername, text);
            }

            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(BigEar[i] == 1)
                {
                    ProxDetector(999999.0, playerid,string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
                }
                else
                {
                    ProxDetector(20.0, playerid,string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
                    SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
                }
            }
        }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)