OnPlayerRequestClass - Teams - 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: OnPlayerRequestClass - Teams (
/showthread.php?tid=251464)
OnPlayerRequestClass - Teams -
G*Mafia - 27.04.2011
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
SetupPlayerForClassSelection(playerid)
if(classid == 0 || classid == 1 || classid == 2 || classid == 3)
{
gTeam[playerid] = TEAM_1;
GameTextForPlayer(playerid, "~b~Cops", 1000,15);
}
else if(classid == 4 || classid == 5 || classid == 6 || classid == 7)
{
gTeam[playerid] = TEAM_2;
GameTextForPlayer(playerid, "~w~Civllian", 1000,16);
}
And I keep getting this error
pawn Код:
C:\Users\MarioG\Desktop\SASP\gamemodes\SASP.pwn(1035) : error 001: expected token: ";", but found "if"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
Line 1035:
pawn Код:
if(classid == 0 || classid == 1 || classid == 2 || classid == 3)
Re: OnPlayerRequestClass - Teams -
elite - 27.04.2011
return 1; ?
Re: OnPlayerRequestClass - Teams -
Steven82 - 27.04.2011
*facepalms*
pawn Код:
SetupPlayerForClassSelection(playerid);
You forgot the ";"
Re: OnPlayerRequestClass - Teams -
elite - 27.04.2011
And replace this
Код:
SetupPlayerForClassSelection(playerid)
with
Код:
SetupPlayerForClassSelection(playerid);
Re: OnPlayerRequestClass - Teams -
G*Mafia - 27.04.2011
Silly me, Thanks D: