24.03.2012, 12:30
'Sup y'all?
I've got a strange problem, I'm not sure why this happens: I've just added a new team (Dealers), and when I'm selecting the classes in the game and I'm arriving at the team, SAMP crashes! The compiler doesn't give any errors, I have no clue why...Here, that's my "OnPlayerRequestClass", the last team I've put in were the dealers, all the others worked before / still work!
EDIT: Strange, it worked after I took out the "GameTextForPlayer"....Hmm, what's wrong with it?
I've got a strange problem, I'm not sure why this happens: I've just added a new team (Dealers), and when I'm selecting the classes in the game and I'm arriving at the team, SAMP crashes! The compiler doesn't give any errors, I have no clue why...Here, that's my "OnPlayerRequestClass", the last team I've put in were the dealers, all the others worked before / still work!
pawn Код:
public OnPlayerRequestClass(playerid, classid) {
SetPlayerTeamFromClass(playerid, classid);
PlayerPlaySound(playerid, 1068 , 0.0, 0.0, 0.0);
switch(classid) {
case 0..2: {
SetPlayerTeamFromClass(playerid, classid);
SetPlayerPos(playerid, 1992.1263,-1175.7640,20.1479);
SetPlayerFacingAngle( playerid, 187.0574 );
SetPlayerCameraPos(playerid, 1991.3074,-1179.9628,20.0234);
SetPlayerCameraLookAt(playerid, 1992.1263,-1175.7640,20.1479);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~p~Ballas", 3000, 3);
//ApplyAnimation(playerid,"SMOKING", "M_smk_tap",4.0,1,1,1,1,1);
} case 3..7: {
SetPlayerPos(playerid, 2486.7598,-1647.5186,14.0703);
SetPlayerFacingAngle( playerid, 187.5500 );
SetPlayerCameraPos(playerid, 2486.4346,-1646.0953-5,14.0703);
SetPlayerCameraLookAt(playerid, 2486.7598,-1647.5186,14.0703);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~Grove Street Families", 3000, 3);
ApplyAnimation(playerid,"RAPPING", "RAP_A_OUT ",4.0,1,1,1,1,1);
} case 8..10: {
SetPlayerPos(playerid, 2571.8352,-1091.2091,66.9639);
SetPlayerFacingAngle(playerid, 48.7203 );
SetPlayerCameraPos(playerid, 2570.1152,-1089.5372,66.8601);
SetPlayerCameraLookAt(playerid, 2571.8352,-1091.2091,66.9639);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~Los Santos Vagos", 3000, 3);
//ApplyAnimation(playerid, "SMOKING", "F_smklean_loop", 4.1, 0, 1, 1, 1, 0, 1);
} case 11 .. 14: {
SetPlayerPos(playerid, 1793.2360,-2122.8770,13.5469);
SetPlayerFacingAngle(playerid, 8.3180 );
SetPlayerCameraPos(playerid, 1793.3226,-2119.6809,13.5543);
SetPlayerCameraLookAt(playerid, 1793.2360,-2122.8770,13.5469);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~b~~h~~h~~h~Los Varrios Aztecas", 3000, 3);
} case 15 .. 23: {
SetPlayerPos(playerid, 1546.7958,-1674.9213,13.5630);
SetPlayerFacingAngle(playerid, 80.8152 );
SetPlayerCameraPos(playerid, 1543.1853,-1675.1349,13.5560);
SetPlayerCameraLookAt(playerid, 1546.7958,-1674.9213,13.5630);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~b~~b~Police & Regime", 3000, 3);
} /*case 24 ..26: {
SetPlayerPos(playerid, 1515.7484,-2232.6597,13.5469);
SetPlayerFacingAngle(playerid, 324.6881 );
SetPlayerCameraPos(playerid, 1518.3016,-2228.4558,13.5469);
SetPlayerCameraLookAt(playerid, 1515.7484,-2232.6597,13.5469);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~w~~w~San Fierro Rifas", 3000, 3);
}*/ case 24 .. 28: {
SetPlayerPos(playerid, 1220.1063,-1410.3185,13.1395);
SetPlayerFacingAngle(playerid, 354.7488);
SetPlayerCameraPos(playerid, 1220.2598,-1407.5026,13.1717);
SetPlayerCameraLookAt(playerid, 1220.1063,-1410.3185,13.1395);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~h~~h~~p~Loco ~g~Syndicato", 3000, 3);
gTeam[playerid] = LOCO;
} case 29 .. 31: { //here starts the dealer-team
SetPlayerPos(playerid, 2782.0300,-2008.1980,13.5547);
SetPlayerFacingAngle(playerid, 359.7808);
SetPlayerCameraPos(playerid, 2782.5583,-2004.1533,13.5471);
SetPlayerCameraLookAt(playerid, 2782.0300,-2008.1980,13.5547);
GameTextForPlayer(playerid, "n~~n~~n~~n~~n~~n~~n~~n~~n~~r~~h~~h~Drug Dealers", 3000, 3);
}
}
return 1;
}