error 017: undefined symbol "playerid"
#1

pawn Код:
forward SendMessageToCops(color, const string[]);
public SendMessageToCops(color,const string[]) //create the callback, including color and string
{
for(new i = 0; i < MAX_PLAYERS; i++) //set a for-loop and loop through all the cops
{
if(IsPlayerConnected(i) == 1) //the cop gotta be connected
if(gTeam[playerid] == TEAM_CIVILIAN) // You need to change this to whatever the cop var is
SendClientMessage(i, COLOR_GREEN, string); //send this message now to every cop online, with color + string!
}
return 1;
}
Title explains...
Reply
#2

pawn Код:
forward SendMessageToCops(color, const string[]);
public SendMessageToCops(color,const string[]) //create the callback, including color and string
{
for(new i = 0; i < MAX_PLAYERS; i++) //set a for-loop and loop through all the cops
{
if(IsPlayerConnected(i) == 1) //the cop gotta be connected
if(gTeam[i] == TEAM_CIVILIAN) // You need to change this to whatever the cop var is
SendClientMessage(i, COLOR_GREEN, string); //send this message now to every cop online, with color + string!
}
return 1;
}
i is the variable emulating the playerid, if you can't fix this problem, I don't think you should be editing other peoples code.
Reply
#3

umm, he said to edit it to our variables......
Reply
#4

pawn Код:
forward SendMessageToCops(playerid,color, const string[]);
public SendMessageToCops(playerid,color,const string[]) //create the callback, including color and string
{
for(new i = 0; i < MAX_PLAYERS; i++) //set a for-loop and loop through all the cops
{
if(IsPlayerConnected(i) == 1) //the cop gotta be connected
if(gTeam[i] == TEAM_CIVILIAN) // You need to change this to whatever the cop var is
SendClientMessage(i, COLOR_GREEN, string); //send this message now to every cop online, with color + string!
}
return 1;
}
try this pal
Reply
#5

It has to be i not playerid
pawn Код:
forward SendMessageToCops(playerid,color, const string[]);
public SendMessageToCops(playerid,color,const string[]) //create the callback, including color and string
{
for(new i = 0; i < MAX_PLAYERS; i++) //set a for-loop and loop through all the cops
{
if(IsPlayerConnected(i) == 1) //the cop gotta be connected
if(gTeam[i] == TEAM_CIVILIAN) // You need to change this to whatever the cop var is
SendClientMessage(i, COLOR_GREEN, string); //send this message now to every cop online, with color + string!
}
return 1;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)