22.08.2015, 12:05
Still not working:
PHP код:
public OnPlayerRequestClass(playerid, classid)
{
switch(classid)
{
if(classid == 0)
{
gTeam[playerid] = TEAM_AMERICA;
GameTextForPlayer(playerid, "~b~Ameericaa", 5000, 5);
SetPlayerPos(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraLookAt(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraPos(playerid,226.7491,1823.0441,7.4141);
SetPlayerFacingAngle(playerid, 270 );
ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1);
CreateExplosion(212.9525,1822.9084,6.4141, 11, 10.0);
}
if(classid == 1)
{
gTeam[playerid] = TEAM_ASIA;
GameTextForPlayer(playerid, "~r~Asia", 5000, 5);
SetPlayerPos(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraLookAt(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraPos(playerid,226.7491,1823.0441,7.4141);
SetPlayerFacingAngle(playerid, 270 );
ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1);
CreateExplosion(212.9525,1822.9084,6.4141, 11, 10.0);
}
if(classid == 2)
{
gTeam[playerid] = TEAM_AFRICA;
GameTextForPlayer(playerid, "~r~Africa", 5000, 5);
SetPlayerPos(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraLookAt(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraPos(playerid,226.7491,1823.0441,7.4141);
SetPlayerFacingAngle(playerid, 270 );
ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1);
CreateExplosion(212.9525,1822.9084,6.4141, 11, 10.0);
}
}
return 1;
}
PHP код:
error 002: only a single statement (or expression) can follow each "case"
error 029: invalid expression, assumed zero
error 010: invalid function or declaration
3 Errors.