public OnPlayerText(playerid, text[])
{
if( (text[0] == '#' || text[0] == '@') && strlen(text) > 1)
{
new str[128];
new szPlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, szPlayerName, MAX_PLAYER_NAME);
if(gTeam(playerid) == TEAM_GREEN)
{
format(str, 128, "[Green Team Chat]» O jogador %s: %s", szPlayerName, text[1]);
for(new iPlayerID; iPlayerID < MAX_PLAYERS; iPlayerID++)
{
if(!IsPlayerConnected(iPlayerID)) continue;
if(!gTeam(iPlayerID) == TEAM_GREEN) continue;
SendClientMessage(iPlayerID, 0x0080C0AA, str);
}
}
return 0;
}
return 1;
}
public OnPlayerText(playerid, text[])
{
if( (text[0] == '#' || text[0] == '@') && strlen(text) > 1)
{
static str[128];
new szPlayerName[MAX_PLAYER_NAME];
if(gTeam(playerid) == TEAM_GREEN)
{
format(str, 128, "[Green Team Chat]» O jogador %s: %s", szPlayerName, text[1]);
for(new iPlayerID; iPlayerID < MAX_PLAYERS; iPlayerID++)
{
if(IsPlayerConnected(iPlayerID))
{
if(gTeam[iPlayerID] == TEAM_GREEN)
{
SendClientMessage(iPlayerID, 0x0080C0AA, str);
}
}
}
}
return 0;
}
return 0;
}
public OnPlayerText(playerid, text[])
{
if( (text[0] == '#' || text[0] == '@') && strlen(text) > 1)
{
for(new i = 0; i < GetMaxPlayers(); i++)
{
if(!gTeam(i) == TEAM_GREEN)
{
new str[128],PlayerName[24];
GetPlayerName(playerid,PlayerName,sizeof(PlayerName));
format(str,sizeof(str),"[TEAM CHAT] » %s: %s", PlayerName, text[1]);
SendClientMessage(i, 0x0080C0AA, str);
}
}
}
return 1;
}
usas assim:
pawn Код:
|
I:\0.3c\0.3c\samp03csvr_win32\gamemodes\rivershell.pwn(426) : error: 012: invalid function call, not a valid address
I:\0.3c\0.3c\samp03csvr_win32\gamemodes\rivershell.pwn(426) : warning: 215: expression has no effect
I:\0.3c\0.3c\samp03csvr_win32\gamemodes\rivershell.pwn(426) : error: 001: expected token: ";", but found ")"
I:\0.3c\0.3c\samp03csvr_win32\gamemodes\rivershell.pwn(426) : error: 029: invalid expression, assumed zero
I:\0.3c\0.3c\samp03csvr_win32\gamemodes\rivershell.pwn(426) : error fatal: 107: too many error messages on one line
if(gTeam(playerid) == TEAM_GREEN)
static gTeam[MAX_PLAYERS];
#define TEAM_GREEN 1
#define TEAM_BLUE 2
public OnPlayerText(playerid, text[])
{
if( (text[0] == '#' || text[0] == '@') && strlen(text) > 1)
{
for(new i = 0; i < GetMaxPlayers(); i++)
{
if(gTeam[i] == TEAM_GREEN)
{
new str[128],PlayerName[24];
GetPlayerName(playerid,PlayerName,sizeof(PlayerName));
format(str,sizeof(str),"[TEAM CHAT] » %s: %s", PlayerName, text[1]);
SendClientMessage(i, 0x0080C0AA, str);
}
}
}
return 1;
}
Й uma variбvel tenta assim
pawn Код:
|
Compilou certinho. Obrigado. E Garfild, qual seria a melhor бrea para postar o download do Rivershell que eu estou melhorando?
|