01.10.2011, 23:00
I have a problem with my gm , when i'm trying to change my skin with F4 , when i select <-- or --> to see the skins , game crashes ... could someone help me?
public OnPlayerRequestClass(playerid, classid) { new string[128]; PlayerPlaySound(playerid, 1187, 0.0, 0.0, 0.0); PlayerInfo[playerid][pModel] = Peds[classid][0]; if (RegistrationStep[playerid] == 0 && gPlayerLogged[playerid] != 1) { ClearChatbox(playerid, 10); SendClientMessage(playerid, COLOR_GREEN, " Welcome to {F81414}ProNion {AFE7FF}- {F3FF02}The Godfather "); //SendClientMessage(playerid, COLOR_RED, " www.ExTreaM.Ro "); //SendClientMessage(playerid, COLOR_YELLOW2, " "); if (gPlayerAccount[playerid] != 0) { new loginstring[128]; new loginname[64]; GetPlayerName(playerid,loginname,sizeof(loginname)); format(loginstring,sizeof(loginstring),"{FFFFFF}Welcome back, {F81414}%s \n \n{FFFFFF}Please enter your {6EF83C}password {FFFFFF}below:",loginname); ShowPlayerDialog(playerid,12346,DIALOG_STYLE_INPUT,"Login",loginstring,"Login","Exit"); format(string, sizeof(string), "Enter in the Login Box your password , %s ! ", loginname); SendClientMessage(playerid, 0xFF7171FF, string); } else { gPlayerAccount[playerid] = 0; new regstring[128]; new regname[64]; GetPlayerName(playerid,regname,sizeof(regname)); format(regstring,sizeof(regstring),"{FFFFFF}Welcome, {F81414}%s \n \n{FFFFFF}You dont have an account.\n \nPlease register your account by typing the password below:",regname); ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"Register",regstring,"Register","Exit"); SendClientMessage(playerid, 0xFF7171FF, "You dont have an account, please register your account by typing the password in the Login Box."); } //PlayerPlaySound(playerid, 1187, 0.0, 0.0, 0.0); PlayerInfo[playerid][pModel] = Peds[classid][0]; SetPlayerTeamFromClass(playerid,classid); } //else SpawnPlayer(playerid); //return false; if (classid == 1) { format(string, sizeof(string), "~y~> ~p~Police Chief ~y~< ~n~Leaders only!"); GameTextForPlayer(playerid,string,3500,6); } else if (classid == 2) { format(string, sizeof(string), "~y~> ~p~FBI/ATF Leader ~y~< ~n~Leaders only!"); GameTextForPlayer(playerid,string,3500,6); } else if (classid == 3) { format(string, sizeof(string), "~y~> ~p~National Guard General ~y~< ~n~Leaders only!"); GameTextForPlayer(playerid,string,3500,6); } else if (classid == 4) { format(string, sizeof(string), "~y~> ~p~Fire/Ambulance Chief ~y~< ~n~Leaders only!"); GameTextForPlayer(playerid,string,3500,6); } else if (classid == 5) { format(string, sizeof(string), "~y~> ~p~The Mafia Leader ~y~< ~n~Leaders only!"); GameTextForPlayer(playerid,string,3500,6); } else if (classid == 6) { format(string, sizeof(string), "~y~> ~p~The Triads Leader ~y~< ~n~Leaders only!"); GameTextForPlayer(playerid,string,3500,6); } /*else if (classid == 7) { format(string, sizeof(string), "~y~> ~p~Mayor ~y~< ~n~Leaders only!"); GameTextForPlayer(playerid,string,3500,6); }*/ else if (classid == 8) { format(string, sizeof(string), "~y~> ~p~Hitman Leader ~y~< ~n~Leaders only!"); GameTextForPlayer(playerid,string,3500,6); } else if (classid == 9) { format(string, sizeof(string), "~y~> ~p~News Leader ~y~< ~n~Leaders only!"); GameTextForPlayer(playerid,string,3500,6); } else if (classid == 10) { format(string, sizeof(string), "~y~> ~p~Taxi Cab Company Leader ~y~< ~n~Leaders only!"); GameTextForPlayer(playerid,string,3500,6); } else if (classid == 11) { format(string, sizeof(string), "~y~> ~p~License Faction Leader ~y~< ~n~Leaders only!"); GameTextForPlayer(playerid,string,3500,6); } else if (classid == 15) { format(string, sizeof(string), "~y~> ~p~Los Santos Vagos Leader ~y~< ~n~Leaders only!"); GameTextForPlayer(playerid,string,3500,6); } else if (classid == 16) { format(string, sizeof(string), "~y~> ~p~Varios Los Aztecas Leader ~y~< ~n~Leaders only!"); GameTextForPlayer(playerid,string,3500,6); } else if (classid == 17) { format(string, sizeof(string), "~y~> ~p~Ballas Leader ~y~< ~n~Leaders only!"); GameTextForPlayer(playerid,string,3500,6); } else if (classid == 18) { format(string, sizeof(string), "~y~> ~p~Grove Leader ~y~< ~n~Leaders only!"); GameTextForPlayer(playerid,string,3500,6); } else { format(string, sizeof(string), "~y~> ~g~Civilian ~y~<"); GameTextForPlayer(playerid,string,3500,6); } SetPlayerTeamFromClass(playerid,classid); SetupPlayerForClassSelection(playerid); return 1; } public SetupPlayerForClassSelection(playerid) { switch (gTeam[playerid]) { case TEAM_BLUE: { SetPlayerInterior(playerid,5); SetPlayerPos(playerid,323.4,305.6,999.1); SetPlayerFacingAngle(playerid, 90.0); SetPlayerCameraPos(playerid,323.4-1.5-1.0,305.6,999.1+0.7); SetPlayerCameraLookAt(playerid,323.4-1.0,305.6,999.1+0.7); } case TEAM_ADMIN: { SetPlayerInterior(playerid,3); SetPlayerPos(playerid,-2654.4,1424.2,912.4); SetPlayerFacingAngle(playerid, 90.0); SetPlayerCameraPos(playerid,-2654.4-1.5,1424.2,912.4+0.7); SetPlayerCameraLookAt(playerid,-2654.4,1424.2,912.4+0.7); } default: { SetPlayerInterior(playerid,0); SetPlayerPos(playerid,-1657.5237,1207.6644,13.6719); SetPlayerFacingAngle(playerid,357.6906); SetPlayerCameraPos(playerid, -1657.4678,1211.2292,13.6781); SetPlayerCameraLookAt(playerid,-1657.5237,1207.6644,13.6719); } } } //--------------------------------------------------------- public SetPlayerTeamFromClass(playerid,classid) { if (classid >= 1 && classid <= 18) { gTeam[playerid] = 11; //admin PlayerInfo[playerid][pTeam] = 11; } else { gTeam[playerid] = 3; PlayerInfo[playerid][pTeam] = 3; } }