01.03.2009, 22:44
Код:
#define TEAM_ITALIAN 1 #define TEAM_ITALIAN_COLOR 0x00FF00AA // Green new gTeam[MAX_PLAYERS];
http://pastebin.com/me2006a1
Here is my script (Not my real one, this is a test for this perticular piece of work)
#define TEAM_ITALIAN 1 #define TEAM_ITALIAN_COLOR 0x00FF00AA // Green new gTeam[MAX_PLAYERS];
Originally Posted by harly
Код:
#define TEAM_ITALIAN 1 #define TEAM_ITALIAN_COLOR 0x00FF00AA // Green new gTeam[MAX_PLAYERS]; http://pastebin.com/me2006a1 Here is my script (Not my real one, this is a test for this perticular piece of work) |
if(text[0] == ',')
{
if (gTeam[playerid] == TEAM_ITALIAN)
{
new String[128],pname[MAX_PLAYER_NAME];
GetPlayerName(playerid,pname,sizeof(pname));
format(String, 128, "[ITALIAN] %s(%d): %s", pname, playerid, text[1]);
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if (gTeam[i] == TEAM_ITALIAN)
{
SendClientMessage(i, COLOR_COLOR, String);
}
}
}
else
{
SendClientMessage(playerid, COLOR_COLOR, "* You are not an Italiano.");
}
return 0;
}
Originally Posted by Rks_
or just do a simple thing at onplayertext like:
if(text[0] == ',') { if (gTeam[playerid] == TEAM_ITALIAN) { new String[128],pname[MAX_PLAYER_NAME]; GetPlayerName(playerid,pname,sizeof(pname)); format(String, 128, "[ITALIAN] %s(%d): %s", pname, playerid, text[1]); for(new i = 0; i < MAX_PLAYERS; i ++) { if (gTeam[i] == TEAM_ITALIAN) { SendClientMessage(i, COLOR_COLOR, String); } } } else { SendClientMessage(playerid, COLOR_COLOR, "* You are not an Italiano."); } return 0; } |
Originally Posted by Rks_
or just do a simple thing at onplayertext like:
if(text[0] == '!') { if (gTeam[playerid] == TEAM_ITALIAN) { new String[128],pname[MAX_PLAYER_NAME]; GetPlayerName(playerid,pname,sizeof(pname)); format(String, 128, "[ITALIAN] %s(%d): %s", pname, playerid, text[1]); for(new i = 0; i < MAX_PLAYERS; i ++) { if (gTeam[i] == TEAM_ITALIAN) { SendClientMessage(i, COLOR_COLOR, String); } } } else { SendClientMessage(playerid, COLOR_COLOR, "* You are not an Italiano."); } return 0; } |