09.03.2011, 23:31
How can i make a team chat with "@". im using gTeam!!! And how can i make if player shoots the target. the target wont lose health
public OnPlayerText(playerid, text[])
{
if(text[0] == @)
{
new string[128], name[MAX_PLAYER_NAME];
format(string,128,"[TEAM] %s[%d]: %s",name,playerid,text[1]);
SendTeamMessage(playerid,string);
return 0;
}
return 1;
}
stock SendTeamMessage(playerid,string[])
{
for(new i = 0; i<MAX_PLAYERS; i++)
{
if(gTeam[playerid] == gTeam[i])
{
return SendClientMessage(i,-1,string);
}
}
}
pawn Код:
pawn Код:
|
D:\Users\Tanush\Desktop\samp dm\gamemodes\DM.pwn(38) : error 029: invalid expression, assumed zero
if(text[0] == '@')