01.11.2009, 01:23
I have just updated my server to 0.3 because I had a problem IRL which stopped me from scripting, but I realized that when I updated, my OnPlayerRequestClass has been screwed up. Normally, if you were registered it'd say "please login"(can read below) or if you weren't it'd say "please register"(in my own words) but now even if you're registered, it says "please register" The only reason I'm posting on the forums and not trying to figure it out myself is because I have no clue what has been updated in 0.3 or what new functions I should use. Here's the code:
Also, it compiles fine with no errors. Thanks for the help.
Код:
public OnPlayerRequestClass(playerid, classid) { new string[126]; PlayerPlaySound(playerid, 1068, 0.0, 0.0, 0.0); PlayerInfo[playerid][pModel] = Peds[classid][0]; if (RegistrationStep[playerid] == 0 && gPlayerLogged[playerid] != 1) { ClearChatbox(playerid, 10); format(string, sizeof(string), "Welcome to Los Santos Life Roleplay. Please proceed to logging in or registering."); SendClientMessage(playerid, COLOR_YELLOW, string); if (gPlayerAccount[playerid] != 0) { SendClientMessage(playerid, COLOR_WHITE, "_____________________________________________________"); SendClientMessage(playerid, COLOR_WHITE, "You have an account registered in our database,"); SendClientMessage(playerid, COLOR_WHITE, "Use the command /login [password] to log into it."); SendClientMessage(playerid, COLOR_WHITE, "_____________________________________________________"); } else { SendClientMessage(playerid,COLOR_GREEN,"_____________________________________________________________"); SendClientMessage(playerid,COLOR_WHITE,"Halt! You don't have an account. You need to register"); SendClientMessage(playerid,COLOR_WHITE,"an account before you can play on Los Santos Life Roleplay."); SendClientMessage(playerid,COLOR_WHITE,"Use the command /register [password] to register your account."); SendClientMessage(playerid,COLOR_GREEN,"______________________________________________________________"); } SetPlayerCameraPos(playerid, 404.1285,-1482.6891,95.8624); SetPlayerCameraLookAt(playerid, 331.3541,-1518.4325,55.5734); SetPlayerPos(playerid, 328.2976,-1514.4808,34.1154); //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~Espana Drogas Leader ~y~< ~n~Leaders only!"); GameTextForPlayer(playerid,string,3500,6); } else if (classid == 6) { format(string, sizeof(string), "~y~> ~p~Luciano 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 == 14) { format(string, sizeof(string), "~y~> ~p~Nortenos Leader ~y~< ~n~Leaders only!"); GameTextForPlayer(playerid,string,3500,6); } else if (classid == 15) { format(string, sizeof(string), "~y~> ~p~Grove Street Leader ~y~< ~n~Leaders only!"); GameTextForPlayer(playerid,string,3500,6); } else if (classid == 16) { format(string, sizeof(string), "~y~> ~p~Jefferson Saints 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;*/ }