29.04.2011, 09:12
Where i can find on SAMP Wiki how to script teams help!!
C:\Documents and Settings\Korisnik\Desktop\G.R.P\gamemodes\SAW.pwn(94) : error 017: undefined symbol "SetPlayerToTeamColor" C:\Documents and Settings\Korisnik\Desktop\G.R.P\gamemodes\SAW.pwn(170) : error 017: undefined symbol "SetPlayerTeamFromClass" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors
#if defined FILTERSCRIPT
#else
#endif
C:\Documents and Settings\Korisnik\Desktop\G.R.P\gamemodes\SAW.pwn(168) : error 017: undefined symbol "classid" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerTeamFromClass(playerid, classid);
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
return 1;
}
#define Civilian 0
#define Cops 1
#define Medic 2
public OnGameModeInit()
{
AddPlayerClass(219, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); // CIVIL // This is 0
AddPlayerClass(280,2281.3210,2429.7224,3.2734,359.5055,3,1,22,50,29,500); // COPS // This is 1
AddPlayerClass(274, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); // MEDIC // This is 2
}
SetPlayerTeamFromClass(playerid, classid)
{
if(classid >= 0 && classid <= 0) SetPlayerTeam(playerid, Civilian); // All ways start with 0
else if(classid >= 1 && classid <= 1) SetPlayerTeam(playerid, Cops);
else if(classid >= 2 && classid <= 2) SetPlayerTeam(playerid, Medic);
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerTeamFromClass(playerid, classid);
if(classid >= 0 && classid <= 0)
{
GameTextForPlayer(playerid, "~r~Civilian", 3000, 3);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 2219.1992,2124.8589,18.0782);
SetPlayerFacingAngle(playerid, 265.7682);
SetPlayerCameraPos(playerid, 2160.5520, 1167.0829, 10.8125);
SetPlayerCameraLookAt(playerid, 2157.1101, 1167.2665, 9.1435);
}
if(classid >= 1 && classid <= 1)
{
GameTextForPlayer(playerid, "~r~Cops", 3000, 3);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 2219.1992,2124.8589,18.0782);
SetPlayerFacingAngle(playerid, 265.7682);
SetPlayerCameraPos(playerid, 2160.5520, 1167.0829, 10.8125);
SetPlayerCameraLookAt(playerid, 2157.1101, 1167.2665, 9.1435);
}
if(classid >= 2 && classid <= 2)
{
GameTextForPlayer(playerid, "~r~Medic", 3000, 3);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 2219.1992,2124.8589,18.0782);
SetPlayerFacingAngle(playerid, 265.7682);
SetPlayerCameraPos(playerid, 2160.5520, 1167.0829, 10.8125);
SetPlayerCameraLookAt(playerid, 2157.1101, 1167.2665, 9.1435);
}
return 1;
}
C:\Documents and Settings\Korisnik\Desktop\G.R.P\gamemodes\SAW.pwn(169) : error 017: undefined symbol "classid" C:\Documents and Settings\Korisnik\Desktop\G.R.P\gamemodes\SAW.pwn(171) : error 017: undefined symbol "classid" C:\Documents and Settings\Korisnik\Desktop\G.R.P\gamemodes\SAW.pwn(181) : error 017: undefined symbol "classid" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 3 Errors.