04.01.2011, 15:17
Olб, estou fazendo um gamemode de TDM sem base, e deu alguns erros no OnPlayerRequestClass
Erros:
Somente a linha 299:
Todo o OnPlayerRequestClass:
Tentei resolver este erro, mas nгo consegui :S
Erros:
Код:
Compilando LVCW.pwn... C:\Documents and Settings\Psy Shotter\Meus documentos\Psy\SAMP\LVCW\gamemodes\LVCW.pwn(299) : error 002: only a single statement (or expression) can follow each "case" C:\Documents and Settings\Psy Shotter\Meus documentos\Psy\SAMP\LVCW\gamemodes\LVCW.pwn(299) : warning 215: expression has no effect Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
pawn Код:
return 1;
Todo o OnPlayerRequestClass:
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
gPlayerClass[playerid] = classid;
switch(classid)
{
case 0,1,2:
{ //LVPD
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
GameTextForPlayer(playerid,"~b~LVPD",2000,3);
SetPlayerColor(playerid, COR_LVPD);
}
case 3,4,5:
{ //FBI
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
GameTextForPlayer(playerid,"~b~FBI",2000,3);
SetPlayerColor(playerid, COR_FBI);
}
case 6,7,8:
{ //Mбfia Corelli
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
GameTextForPlayer(playerid,"~p~Mafia Corelli",2000,3);
SetPlayerColor(playerid, COR_CORELLI);
}
case 9,10,11:
{ //Mбfia Yamagury
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
GameTextForPlayer(playerid,"~p~Mafia Yamagury",2000,3);
SetPlayerColor(playerid, COR_YAMAGURY);
}
case 12,13:
{ //Mбfia do Bozo
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
GameTextForPlayer(playerid,"~p~Mafia do Bozo",2000,3);
SetPlayerColor(playerid, COR_BOZO);
}
case 14,15,16:
{ //Mбfia Champeones
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
GameTextForPlayer(playerid,"~p~Mafia Champeones",2000,3);
SetPlayerColor(playerid, COR_CHAMPEONES);
}
case 18,19:
{ //Bloods
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
GameTextForPlayer(playerid,"~r~Bloods",2000,3);
SetPlayerColor(playerid, COR_BLOODS);
}
case 20,21 :
{ //Crips
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
GameTextForPlayer(playerid,"~b~Crips",2000,3);
SetPlayerColor(playerid, COR_CRIPS);
}
case 22,23,24:
{ //Florencia
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
GameTextForPlayer(playerid,"~g~Florencia",2000,3);
SetPlayerColor(playerid, COR_FLORENCIA);
}
case 25,26,27:
{ //Golf Club
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
GameTextForPlayer(playerid,"~b~Golf Club",2000,3);
SetPlayerColor(playerid, COR_GOLF);
}
case 28,29,30:
{ //Penelope's Crew
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
GameTextForPlayer(playerid,"~p~Penelopes Crew",2000,3);
SetPlayerColor(playerid, COR_PENELOPE);
}
case 100,247,248:
{ //Infernal Bikers
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
GameTextForPlayer(playerid,"~r~Infernal Bikers",2000,3);
SetPlayerColor(playerid, COR_BIKERS);
}
return 1;
}