Factions - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Factions (
/showthread.php?tid=265704)
Factions -
Glorian - 02.07.2011
Hello!
I followed a guide to add Gang and Police faction.
When i add it and compile i get this:
Код:
C:\GTA Trucking Server\Test Script Server\gamemodes\khaos.pwn(216) : error 017: undefined symbol "SetPlayerToTeamColour"
C:\GTA Trucking Server\Test Script Server\gamemodes\khaos.pwn(445) : error 017: undefined symbol "SetPlayerTeamFromClass"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
Script File:
http://pastebin.com/xqbG1fCR
Re: Factions -
Steven82 - 02.07.2011
You need to remove those functions, or create them.
Re: Factions -
Glorian - 02.07.2011
So have can i create them?
Re: Factions -
Jay. - 02.07.2011
These are not exsisting functions , you have to make them yourself or it will give you errors.
Can we see the tutorial you used?
Also
maybe these help:
https://sampforum.blast.hk/showthread.php?tid=253018
pawn Код:
SetPlayerTeamFromClass(playerid, classid)
{
if (classid == 1)
{
gTeam[playerid] = TEAM_POLICE;
}
if(classid == 2)
{
gTeam[playerid] = TEAM_MAFIA;
}
}
SetPlayerToTeamColor(playerid)
{
if (gTeam[playerid] == TEAM_POLICE)
{
SetPlayerColor(playerid, COLOR_AQUA);
}
else if (gTeam[playerid] == TEAM_MAFIA)
{
SetPlayerColor(playerid, COLOR_BROWN);
}
}
I didn't make them, you can replace your colours with yours and change the teams to yours, as well.
and the classess.