[Help] Team help
#1

Okay I have attempted to make teams but here's the problem that I get.
C:\Documents and Settings\Maxa\Desktop\SAMP server\gamemodes\teams.pwn(74) : error 017: undefined symbol "SetPlayerTeamFromClass"

I am Using this code.
https://sampforum.blast.hk/showthread.php?tid=107426
Reply
#2

Make sure that this is in your code somewhere .

pawn Код:
SetPlayerTeamFromClass(playerid, classid)
{
  if(classid == 0)
  {
             gTeam[playerid] = TEAM_WORKERS;
        SetPlayerTeam(playerid,TEAM_WORKERS);//You can delete this line if you want to allow team killing...
        GameTextForPlayer(playerid,"~g~Workers",10,0);
  }
  else if(classid == 1)
  {
             gTeam[playerid] = TEAM_AGENTS;
        SetPlayerTeam(playerid,TEAM_AGENTS);//Same for this!
        GameTextForPlayer(playerid,"~r~Agents",10,0);
  }
}
Reply
#3

It is.
Reply
#4

Can I see your full code then?
Reply
#5

I added full code from the link there. But still not working.
Reply
#6

http://pastebin.com/Citkuj51 <<<--- whole thing..
Reply
#7

SetPlayerTeamFromClass needs to be outside OnPlayerRequestClass.

http://pastebin.com/k8g2K5nc
Reply
#8

oh thanks!
Reply
#9

Another problem..
C:\Documents and Settings\Maxa\Desktop\SAMP server\gamemodes\teams.pwn(293) : warning 203: symbol is never used: "SetPlayerTeamFromClass"

I did everything that you said but this is coming..
Reply
#10

You need to add

pawn Код:
SetPlayerTeamFromClass(playerid, classid);
Under OnPlayerRequestClass .
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)