Where Do I Put This?
#1

So im trying to make teams for my Death Match in the making. So i found a tutorial here https://sampforum.blast.hk/showthread.php?tid=243194

but i do not know where to put

Код:
if(text[0] == '!')
{
new name[24], string[256];
GetPlayerName(playerid, name, 24);
format(string, sizeof(string), "[TEAM]%s: %s", name, text[1]);
for(new c = 0; c < MAX_PLAYERS; c++)
{
if(IsPlayerConnected©)
{
if(GetPlayerTeam© == GetPlayerTeam(playerid))    
SendClientMessage(c, GetPlayerColor(playerid), string);    
}
}return 0;
}
Please Help
Reply
#2

public OnPlayerText();...
Reply
#3

Under
pawn Код:
public OnPlayerText(playerid, text[])
{
Reply
#4

Quote:
Originally Posted by Naruto_Emilio
Посмотреть сообщение
public OnPlayerText();...
Okay And How Do I Fix These Error Codes

Код:
C:\Documents and Settings\Administrator\Desktop\DeathMatch Backup.pwn(176) : error 017: undefined symbol "COLOR_GREEN"
C:\Documents and Settings\Administrator\Desktop\DeathMatch Backup.pwn(180) : error 017: undefined symbol "COLOR_GREEN"
C:\Documents and Settings\Administrator\Desktop\DeathMatch Backup.pwn(183) : warning 209: function "OnPlayerCommandText" should return a value
This Is What The Lines Look Like

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/myteam", cmdtext, true, 10) == 0)
	{
	if (pTeam[playerid] == team_Army)
	    {
  				SendClientMessage(playerid,COLOR_GREEN, "You are a bad guy");
	    }
		else if (pTeam[playerid] == team_Fbi)
		    {
			        SendClientMessage(playerid,COLOR_GREEN, "You are a good guy");
         }
	return 1;}
}
Код:
And yes i do have 

//Colors

	#define COLOR_GREY 0xAFAFAFAA
	#define COLOR_GREEN 0x33AA33AA
	#define COLOR_BRIGHTRED 0xFF0000AA
	#define COLOR_YELLOW 0xFFFF00AA
	#define COLOR_PINK 0xFF66FFAA
	#define COLOR_BLUE 0x3A47DEFF
	#define COLOR_TAN 0xBDB76BAA
	#define COLOR_PURPLE 0x800080AA
	#define COLOR_WHITE 0xFFFFFFAA
	#define COLOR_LIGHTBLUE 0x33CCFFAA
	#define COLOR_ORANGE 0xFF9900AA
	#define COLOR_INDIGO 0x4B00B0AA
	#define COLOR_BLACK 0x00000000
	#define COLOR_DARKGREY 0x696969FF
	#define COLOR_RED 0xFF0000AA
Reply
#5

pawn Код:
return 1;}
}
To
pawn Код:
return 1;
}
}
And
pawn Код:
if (strcmp("/myteam", cmdtext, true, 10) == 0)
    {
to
pawn Код:
if (strcmp("/myteam", cmdtext, true, 8) == 0)
    {
Reply
#6

Sorry for double posts,
Maybe try to use zcmd processor like
pawn Код:
#include <zcmd> //On the top
And For the command

pawn Код:
CMD:myteam(playerid, params[])
    {
    if (pTeam[playerid] == team_Army)
        {
                GameForTextPlayer(playerid, "You are In the army Soldier!!",5000,3);
        }
        else if (pTeam[playerid] == team_Fbi)
            {
                      GameForTextPlayer(playerid, "You are a FBI Member!!",5000,3);
         }
    return 1;
}
}
If not give me your msn then i will fix it to you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)