script help
#1

Hello guys can any one tell me how i can add vip tag in names of vips players ? (in Zombie apocalypse gamemode)

(VIP)Player: ...
Reply
#2

PHP код:
public OnPlayerText(playerid,text) {
   if(
Yourviplevelcheck >= 1) {
      new 
string[128],name[25];
      
GetPlayerName(playerid,name,25);
       
format(string,128,"(VIP)%s(%d): {addwhitecolor}%s",name,playerid,text);
       
SendClientMessageToAll(GetPlayerColour(playerid),string);
       return 
0;
   }

Reply
#3

i Found this Errors

C:\Documents and Settings\khabouri\Bureau\Windows Version [0.3z] by GamerX & Slawi\gamemodes\zma4.pwn(2112) : error 003: declaration of a local variable must appear in a compound block
C:\Documents and Settings\khabouri\Bureau\Windows Version [0.3z] by GamerX & Slawi\gamemodes\zma4.pwn(2112) : warning 217: loose indentation
C:\Documents and Settings\khabouri\Bureau\Windows Version [0.3z] by GamerX & Slawi\gamemodes\zma4.pwn(2112) : error 017: undefined symbol "string"
C:\Documents and Settings\khabouri\Bureau\Windows Version [0.3z] by GamerX & Slawi\gamemodes\zma4.pwn(2112) : warning 215: expression has no effect
C:\Documents and Settings\khabouri\Bureau\Windows Version [0.3z] by GamerX & Slawi\gamemodes\zma4.pwn(2112) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\khabouri\Bureau\Windows Version [0.3z] by GamerX & Slawi\gamemodes\zma4.pwn(2112) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.


Код:
public OnPlayerText(playerid, text[])
{
    if(pInfo[playerid][pVipLevel] >= 1)
      new string[128],name[25];
      GetPlayerName(playerid,name,25);
       format(string,128,"(VIP)%s(%d): {addwhitecolor}%s",name,playerid,text);
       SendClientMessageToAll(GetPlayerColour(playerid),string);
       return 0;
   }
}
	if(GetPVarInt(playerid, "SPS Muted") == 0)
	{
		SetPVarInt(playerid, "SPS Messages Sent", GetPVarInt(playerid, "SPS Messages Sent") + 1);
		SetTimerEx("SPS_Remove_Messages_Limit", 1500, 0, "i", playerid);

		if(GetPVarInt(playerid, "SPS Messages Sent") >= 4)
		{
		    if(!(((GetPVarInt(playerid, "SPS Spam Warnings") + 2) == 3)))
		    {
			    SendClientMessage(playerid, -1, ""chat""COL_LIGHTBLUE" Please, do not spam.");
		    }
		    SetPVarInt(playerid, "SPS Spam Warnings", GetPVarInt(playerid, "SPS Spam Warnings") + 1);
		}

		if(pInfo[playerid][pLogged] == 1)
		{
	        new stringbig[356];
	        if(pInfo[playerid][IsPlayerMuted] == 1) {
	            SendClientMessage(playerid,-1,""chat" You are muted");
	            return 0;
			}
            if(team[playerid] == TEAM_HUMAN)
			{
			format(stringbig,sizeof(stringbig),""COL_WHITE"[Human](%d): {FFFFFF}%s",playerid, text);
	  		SendPlayerMessageToAll(playerid,stringbig);
	  		}
            if(team[playerid] == TEAM_ZOMBIE)
			{
			format(stringbig,sizeof(stringbig),""COL_WHITE"[Zombie](%d): {FFFFFF}%s",playerid, text);
	  		SendPlayerMessageToAll(playerid,stringbig);
	  		}
            {
                SetPlayerChatBubble(playerid, text, 0xFF0000FF, 100.0, 10000);
            }
	    }
	}
	else
	{
		SendClientMessage(playerid, -1, ""chat""COL_LIGHTBLUE" You are muted, you can't talk.");
		return 0;
	}
	return 0;
}
Reply
#4

Remove the second } after return 0;
Reply
#5

Quote:
Originally Posted by jlalt
Посмотреть сообщение
Remove the second } after return 0;
Код:
C:\Documents and Settings\khabouri\Bureau\zma4.pwn(2112) : error 003: declaration of a local variable must appear in a compound block
C:\Documents and Settings\khabouri\Bureau\zma4.pwn(2112) : warning 217: loose indentation
C:\Documents and Settings\khabouri\Bureau\zma4.pwn(2112) : error 017: undefined symbol "string"
C:\Documents and Settings\khabouri\Bureau\zma4.pwn(2112) : warning 215: expression has no effect
C:\Documents and Settings\khabouri\Bureau\zma4.pwn(2112) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\khabouri\Bureau\zma4.pwn(2112) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.

Код:
public OnPlayerText(playerid, text[])
{
    if(pInfo[playerid][pVipLevel] >= 1)
      new string[128],name[25];
      GetPlayerName(playerid,name,25);
       format(string,128,"(VIP)%s(%d): {addwhitecolor}%s",name,playerid,text);
       SendClientMessageToAll(GetPlayerColour(playerid),string);
       return 0;
   }
	if(GetPVarInt(playerid, "SPS Muted") == 0)
	{
		SetPVarInt(playerid, "SPS Messages Sent", GetPVarInt(playerid, "SPS Messages Sent") + 1);
		SetTimerEx("SPS_Remove_Messages_Limit", 1500, 0, "i", playerid);

		if(GetPVarInt(playerid, "SPS Messages Sent") >= 4)
		{
		    if(!(((GetPVarInt(playerid, "SPS Spam Warnings") + 2) == 3)))
		    {
			    SendClientMessage(playerid, -1, ""chat""COL_LIGHTBLUE" Please, do not spam.");
		    }
		    SetPVarInt(playerid, "SPS Spam Warnings", GetPVarInt(playerid, "SPS Spam Warnings") + 1);
		}

		if(pInfo[playerid][pLogged] == 1)
		{
	        new stringbig[356];
	        if(pInfo[playerid][IsPlayerMuted] == 1) {
	            SendClientMessage(playerid,-1,""chat" You are muted");
	            return 0;
			}
            if(team[playerid] == TEAM_HUMAN)
			{
			format(stringbig,sizeof(stringbig),""COL_WHITE"[Human](%d): {FFFFFF}%s",playerid, text);
	  		SendPlayerMessageToAll(playerid,stringbig);
	  		}
            if(team[playerid] == TEAM_ZOMBIE)
			{
			format(stringbig,sizeof(stringbig),""COL_WHITE"[Zombie](%d): {FFFFFF}%s",playerid, text);
	  		SendPlayerMessageToAll(playerid,stringbig);
	  		}
            {
                SetPlayerChatBubble(playerid, text, 0xFF0000FF, 100.0, 10000);
            }
	    }
	}
	else
	{
		SendClientMessage(playerid, -1, ""chat""COL_LIGHTBLUE" You are muted, you can't talk.");
		return 0;
	}
	return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)