Where Do I Put This? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Where Do I Put This? (
/showthread.php?tid=261047)
Where Do I Put This? -
Bmxerlmao5288 - 11.06.2011
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
Re : Where Do I Put This? -
Naruto_Emilio - 11.06.2011
public OnPlayerText();...
AW: Where Do I Put This? -
Julian12345 - 11.06.2011
Under
pawn Код:
public OnPlayerText(playerid, text[])
{
Re: Re : Where Do I Put This? -
Bmxerlmao5288 - 11.06.2011
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
Re : Where Do I Put This? -
Naruto_Emilio - 11.06.2011
To
And
pawn Код:
if (strcmp("/myteam", cmdtext, true, 10) == 0)
{
to
pawn Код:
if (strcmp("/myteam", cmdtext, true, 8) == 0)
{
Re : Where Do I Put This? -
Naruto_Emilio - 11.06.2011
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