Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerRequestClass(playerid, classid)
- {
- if(gPlayerLogged[playerid] == 1)
- {
- if(ChosenSkin[playerid] == 1) return SpawnPlayer(playerid);
- }
- if (RegistrationStep[playerid] == 0 && gPlayerLogged[playerid] != 1)
- {
- SetPlayerInterior(playerid,0);
- SetPlayerPos(playerid, 1742.9814,-1863.0938,16.2048);
- InterpolateCameraPos(playerid, 1804.1313,-1732.0179,21.7294, 1037.3715,-1732.7358,25.2859, 30000, CAMERA_MOVE);
- InterpolateCameraLookAt(playerid,1441.6654,-1732.0317,18.0373,1037.3715,-1732.7358,25.2859, 30000, CAMERA_MOVE);
- TogglePlayerControllable(playerid, 0);
- if (gPlayerAccount[playerid] != 0)
- {
- new loginstring[320],
- loginname[64],
- laston[64],
- field[128];
- GetPlayerName(playerid,loginname,sizeof(loginname));
- format(field,128,"SELECT `lastOn` FROM users WHERE `name`='%s'",loginname);
- mysql_query(SQL,field);
- mysql_store_result();
- if(mysql_retrieve_row())
- {
- mysql_fetch_field_row(laston, "lastOn");
- }
- mysql_free_result();
- SendClientMessage(playerid, COLOR_GENANNOUNCE, "SERVER: {FFFFFF}Welcome to RULEPLAY RPG.");
- SendClientMessage(playerid, COLOR_GENANNOUNCE, "SERVER: {FFFFFF}You already have a registered account, please enter your password into the dialog box.");
- format(loginstring,sizeof(loginstring),"Welcome to the RULEPLAY RPG Server.\nPlease enter your password below!");
- ShowPlayerDialog(playerid,DIALOG_LOGIN2,DIALOG_STYLE_PASSWORD,"SERVER: Login",loginstring,"Login","Cancel");
- }
- else
- {
- gPlayerAccount[playerid] = 0;
- new regstring[200],
- regname[64],
- loginname[158],
- stringgg[300];
- GetPlayerName(playerid,loginname,sizeof(loginname));
- for(new clanid; clanid < MAX_CLANS; clanid++)
- {
- if(strfind(loginname,ClanInfo[clanid][cClanTag],true) != -1)
- {
- format(stringgg,sizeof(stringgg),"Nu poti folosi acel username. '%s' este inregistrat de un clan. Nu poti folosi acel cuvant in nickname-ul tau.",ClanInfo[clanid][cClanTag]);
- SendClientMessage(playerid, COLOR_RED, stringgg);
- format(stringgg,sizeof(stringgg),"You can't use that username! '%s' is a registered clan tag. You can't use that word in your nickname.",ClanInfo[clanid][cClanTag]);
- SendClientMessage(playerid, COLOR_RED, stringgg);
- KickEx(playerid);
- }
- }
- GetPlayerName(playerid,regname,sizeof(regname));
- SendClientMessage(playerid, COLOR_GENANNOUNCE, "SERVER: {FFFFFF}Welcome to RULEPLAY RPG.");
- SendClientMessage(playerid, COLOR_GENANNOUNCE, "SERVER: {FFFFFF}You aren't registered yet. Please enter your desired password in the dialog box to register.");
- format(regstring,sizeof(regstring),"Welcome to the RULEPLAY RPG Server.\nPlease enter your desired password below!");
- ShowPlayerDialog(playerid,DIALOG_LOGIN1,DIALOG_STYLE_PASSWORD,"SERVER: Registration",regstring,"Register","Cancel");
- }
- login[playerid] = SetTimerEx("Logink",60000,false,"d",playerid);
- }
- else if(IsPlayerNPC(playerid)) return 1;
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement