11.02.2014, 09:44
ok, So I'm trying to make it so that when a player types /f it sends the message to players in his faction I can make it work with my non Dynamic faction system but when I try make it with the dynamic system it doesn't work.
code dynamic:
Error Message Dynamic:
Code non dynamic:
code dynamic:
pawn Код:
forward SendMessageToOfficialFaction(color,const string[]);
public SendMessageToOfficialFaction(color,const string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) == 1)
if(PlayerInfo[i][pFaction] == PlayerInfo[playerid][pFaction])
SendClientMessage(i, color, string);
}
return 1;
}
Код:
C:\Users\nathan\Desktop\Sa-mp v2\gamemodes\hrp.pwn(1114) : error 017: undefined symbol "playerid" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
pawn Код:
forward SendMessageToPoliceFaction(color,const string[]);
public SendMessageToPoliceFaction(color,const string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) == 1) //the admin gotta be connected
if(PlayerInfo[i][pFaction] == 30)
SendClientMessage(i, color, string);
}
return 1;
}