24.06.2013, 14:57
Код:
#else main() { print("\n----------------------------------"); print(" Romanian Free Server"); print("----------------------------------\n"); } #endif new lspddoor1,lspddoor2,lspddoor3,lspddoor4,lspdgate1,lspdgate2; public OnGameModeInit() { SetGameModeText("RomanianFreeServer"); UsePlayerPedAnims(); AllowInteriorWeapons(1); ShowPlayerMarkers(0); ShowNameTags(1); DisableInteriorEnterExits(); SetNameTagDrawDistance(20.0); EnableStuntBonusForAll(0); hitman = GangZoneCreate(-2711.423, 499.3826, -1996.826, 1087.182); CreateDynamicMapIcon(1553.8164,-1675.7432,16.1953,30,-1,-1,-1,-1,300.0); // LSPD CreateObject(1491,225.10000610,115.90000153,1002.20001221,0.00000000,0.00000000,0.00000000); //object(gen_doorint01) (1) CreateObject(1491,220.30000305,116.00000000,1002.20001221,0.00000000,0.00000000,0.00000000); //object(gen_doorint01) (2) CreateObject(1491,223.30000305,116.00000000,1002.20001221,0.00000000,0.00000000,180.00000000); //object(gen_doorint01) (3) CreateObject(1649,242.00000000,119.40000153,1005.09997559,0.00000000,0.00000000,0.00000000); //object(wglasssmash) (1) CreateObject(1649,246.39999390,119.40000153,1005.09997559,0.00000000,0.00000000,0.00000000); //object(wglasssmash) (2) CreateObject(1649,250.80000305,119.40000153,1005.09997559,0.00000000,0.00000000,0.00000000); //object(wglasssmash) (4) lspddoor1 = CreateObject(1536,239.50000000,119.09999847,1002.20001221,0.00000000,0.00000000,270.49987793); //object(gen_doorext15) (1) lspddoor2 = CreateObject(1536,239.60000610,116.09999847,1002.20001221,0.00000000,0.00000000,90.49438477); //object(gen_doorext15) (2) lspddoor3 = CreateObject(1536,253.19999695,110.59999847,1002.20001221,0.00000000,0.00000000,270.49987793); //object(gen_doorext15) (1) lspddoor4 = CreateObject(1536,253.19999695,107.59999847,1002.20001221,0.00000000,0.00000000,88.49438477); //object(gen_doorext15) (2) CreateObject(2886,239.80000305,116.19999695,1003.70001221,0.00000000,0.00000000,92.00000000); //object(sec_keypad) (1) CreateObject(2886,253.00000000,110.40000153,1003.70001221,0.00000000,0.00000000,267.99951172); //object(sec_keypad) (2) CreateObject(2886,239.30000305,118.90000153,1003.70001221,0.00000000,0.00000000,267.99951172); //object(sec_keypad) (1) CreateObject(2886,253.39999390,107.69999695,1003.70001221,0.00000000,0.00000000,91.99499512); //object(sec_keypad) (2) CreatePickup(1247,1,1554.2738,-1675.5295,16.1953,0); CreatePickup(1318,1,246.4012,107.2995,1003.2188,0); CreateObject(3109,213.60000610,126.40000153,1003.29998779,0.00000000,0.00000000,180.00000000); //object(imy_la_door) (1) CreateObject(3109,217.50000000,125.09999847,1003.29998779,0.00000000,0.00000000,359.99450684); //object(imy_la_door) (2) CreatePickup(1318,1,214.0999,125.7107,1003.2188,0); // Way to Garage CreatePickup(1318,1,217.0594,125.8019,1003.2188,0); // Way to roof CreatePickup(1318,1,1552.5898,-1677.9690,6.2188,0); // Garage CreatePickup(1318,1,1524.4833,-1677.8240,6.2188,0); // Garage to roof CreatePickup(1318,1,1571.8706,-1675.5492,28.3955,0); // Roof CreatePickup(1318,1,1558.0908,-1675.5249,28.3955,0); // Roof to garage CreateObject(1653,246.50000000,119.30000305,1004.20001221,0.00000000,0.00000000,0.00000000); //object(fencehaitism) (1) CreateObject(1653,246.50000000,119.30000305,1005.59997559,0.00000000,0.00000000,0.00000000); //object(fencehaitism) (2) CreateObject(1704,243.39999390,124.50000000,1002.20001221,0.00000000,0.00000000,0.00000000); //object(kb_chair03) (1) CreateObject(1704,249.10000610,124.50000000,1002.20001221,0.00000000,0.00000000,0.00000000); //object(kb_chair03) (2) CreateObject(2190,243.80000305,122.90000153,1003.09997559,0.00000000,0.00000000,170.00000000); //object(pc_1) (1) CreateObject(2190,249.30000305,122.80000305,1003.09997559,0.00000000,0.00000000,169.99694824); //object(pc_1) (2) CreateObject(14604,252.39999390,121.09999847,1003.20001221,0.00000000,0.00000000,88.00000000); //object(tv_stand_bike) (1) CreateObject(2700,249.00000000,119.59999847,1006.59997559,0.00000000,30.00000000,88.00000000); //object(cj_sex_tv2) (1) CreateObject(2700,246.80000305,119.69999695,1006.59997559,0.00000000,29.99816895,87.99499512); //object(cj_sex_tv2) (2) CreateObject(2700,244.60000610,119.80000305,1006.59997559,0.00000000,29.99816895,87.99499512); //object(cj_sex_tv2) (3) CreateObject(2572,262.70001221,108.40000153,1003.70001221,0.00000000,0.00000000,100.00000000); //object(hotel_single_2) (1) CreateObject(2315,267.70001221,110.09999847,1003.59997559,0.00000000,0.00000000,270.00000000); //object(cj_tv_table4) (1) CreateObject(1748,267.89999390,109.19999695,1004.09997559,0.00000000,0.00000000,266.00000000); //object(low_tv_3) (1) CreateObject(1657,245.60000610,111.80000305,1010.50000000,0.00000000,0.00000000,0.00000000); //object(htl_fan_rotate_nt) (1) CreateObject(990,1543.50000000,-1638.30004883,14.10000038,0.00000000,0.00000000,89.25000000); //object(bar_barrier12) (1) CreateObject(992,1544.50000000,-1622.80004883,14.10000038,0.00000000,0.00000000,86.00000000); //object(bar_barrier10b) (1) CreateObject(992,1544.69995117,-1619.50000000,14.10000038,0.00000000,0.00000000,85.99548340); //object(bar_barrier10b) (2) CreateObject(992,1543.59997559,-1633.90002441,14.10000038,0.00000000,0.00000000,89.99548340); //object(bar_barrier10b) (3) lspdgate1 = CreateObject(976,1544.09997559,-1623.50000000,12.39999962,0.00000000,0.00000000,266.75000000); //object(phils_compnd_gate) (1) lspdgate2 = CreateObject(980,1586.69995117,-1638.19995117,15.10000038,0.00000000,0.00000000,0.00000000); //object(airportgate) (1) CreatePickup(1318,1,1583.5065,-1638.2456,13.3543,0); CreatePickup(1318,1,1544.0807,-1624.8009,13.3828,0); return 1; } public OnGameModeExit() { return 1; } public OnPlayerRequestClass(playerid, classid) { SpawnPlayer(playerid); } public OnPlayerConnect(playerid) { if(fexist(UserPath(playerid))) { INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid); ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,"Login","Type your password below to login.","Login","Quit"); } else { ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,"Registering...","Type your password below to register a new account.","Register","Quit"); } SetTimer("CurrentTime",1,true); TogglePlayerClock(playerid,1); OnPlayerUpdateExTimer[playerid] = SetTimerEx("OnPlayerUpdateEx", 1000, true, "i", playerid); godcar[playerid] = false; if(PlayerInfo[playerid][pFaction] == 0) return SetPlayerColor(playerid,COLOR_WHITE); if(PlayerInfo[playerid][pFaction] == 1 || PlayerInfo[playerid][pLeader] == 1) return SetPlayerColor(playerid,0x1464F4); // 0x00B2EE, 0x1464F4, origin 0x0000FFFF if(PlayerInfo[playerid][pFaction] == 0) { SetSpawnInfo(playerid,0,PlayerInfo[playerid][pSkin],1309.9510,-1368.3278,13.5474,184.3216,0,0,0,0,0,0); } if(PlayerInfo[playerid][pFaction] == 1 || PlayerInfo[playerid][pLeader] == 1) { SetSpawnInfo(playerid,0,PlayerInfo[playerid][pSkin],228.6125,110.3943,1003.2188,90.0000,41,500,0,0,0,0); SetPlayerInterior(playerid,10); SetPlayerFacingAngle(playerid,356.5215); } return 1; } public OnPlayerDisconnect(playerid, reason) { new INI:File = INI_Open(UserPath(playerid)); INI_SetTag(File,"data"); INI_WriteInt(File,"Cash",PlayerInfo[playerid][pCash]); INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]); INI_WriteInt(File,"Wanted",PlayerInfo[playerid][pWanted]); INI_WriteInt(File,"Faction",PlayerInfo[playerid][pFaction]); INI_WriteInt(File,"Rank",PlayerInfo[playerid][pRank]); INI_WriteInt(File,"Leader",PlayerInfo[playerid][pLeader]); INI_WriteInt(File,"FWarns",PlayerInfo[playerid][pFWarns]); INI_WriteInt(File,"Skin",GetPlayerSkin(playerid)); INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]); INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]); INI_WriteInt(File,"Banned",PlayerInfo[playerid][pBanned]); INI_Close(File); PlayerInfo[playerid][pLogged] = 0; KillTimer(OnPlayerUpdateExTimer[playerid]); godcar[playerid] = false; return 1; } public OnPlayerSpawn(playerid) { GangZoneShowForPlayer(playerid, hitman, 0xFF000096); SetPlayerWantedLevel(playerid,PlayerInfo[playerid][pWanted]); if(PlayerInfo[playerid][pFaction] == 0) return SetPlayerSkin(playerid,PlayerInfo[playerid][pSkin]); if(PlayerInfo[playerid][pFaction] == 1 || PlayerInfo[playerid][pLeader] == 1) return SetPlayerSkin(playerid,PlayerInfo[playerid][pSkin]); return 1; } public OnPlayerDeath(playerid, killerid, reason) { PlayerInfo[killerid][pKills]++; PlayerInfo[playerid][pDeaths]++; return 1; } public OnVehicleSpawn(vehicleid) { return 1; } public OnVehicleDeath(vehicleid, killerid) { return 1; } public OnPlayerText(playerid, text[]) { if(PlayerInfo[playerid][pLogged] == 0) { SendClientMessage(playerid,COLOR_WHITE,"*** Trebuie sa te logezi/inregistrezi mai intai."); return 0; } new message[128]; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name)); format(message, sizeof(message), "%s says: %s", name, text); ProxDetector(playerid, 20.0, message, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5); return 0; } public OnPlayerCommandText(playerid, cmdtext[]) { return 0; } public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { return 1; } public OnPlayerExitVehicle(playerid, vehicleid) { return 1; } public OnPlayerStateChange(playerid, newstate, oldstate) { return 1; } public OnPlayerEnterCheckpoint(playerid) { return 1; } public OnPlayerLeaveCheckpoint(playerid) { return 1; } public OnPlayerEnterRaceCheckpoint(playerid) { return 1; } public OnPlayerLeaveRaceCheckpoint(playerid) { return 1; } public OnRconCommand(cmd[]) { return 1; } public OnPlayerRequestSpawn(playerid) { return 1; } public OnObjectMoved(objectid) { return 1; } public OnPlayerObjectMoved(playerid, objectid) { return 1; } public OnPlayerPickUpPickup(playerid, pickupid) { return 1; } public OnVehicleMod(playerid, vehicleid, componentid) { return 1; } public OnVehiclePaintjob(playerid, vehicleid, paintjobid) { return 1; } public OnVehicleRespray(playerid, vehicleid, color1, color2) { return 1; } public OnPlayerSelectedMenuRow(playerid, row) { return 1; } public OnPlayerExitedMenu(playerid) { return 1; } public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid) { return 1; } public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { return 1; } public OnRconLoginAttempt(ip[], password[], success) { return 1; } public OnPlayerUpdate(playerid) { if(GetPlayerMoney(playerid) < PlayerInfo[playerid][pCash] || GetPlayerMoney(playerid) > PlayerInfo[playerid][pCash]) { ResetPlayerMoney(playerid); GivePlayerMoney(playerid,PlayerInfo[playerid][pCash]); new string[128],Name[MAX_PLAYER_NAME]; GetPlayerName(playerid,Name,sizeof(Name)); format(string,sizeof(string),"(AmdWarn) %s(%d) este suspectat de Money Hacking.",Name,playerid); SendMessageToAdmins(COLOR_LIGHTRED,string); } new armedweapon = GetPlayerWeapon(playerid); new Name[MAX_PLAYER_NAME],string[128]; GetPlayerName(playerid,Name,sizeof(Name)); if(armedweapon == 38) { if(PlayerInfo[playerid][pAdmin] < 1) { format(string,sizeof(string),"AdmCmd: %s was banned by the server, Reason: Minigun Cheats",Name); SendClientMessageToAll(COLOR_LIGHTRED,string); PlayerInfo[playerid][pBanned] = 1; BanEx(playerid,"Minigun Cheats"); } } if(IsPlayerInRangeOfPoint(playerid,1.0,1554.2738,-1675.5295,16.1953)) { SetPlayerPos(playerid,246.4668,109.3327,1003.2187); SetPlayerFacingAngle(playerid,356.5215); SetPlayerInterior(playerid,10); } if(IsPlayerInRangeOfPoint(playerid,1.0,246.4012,107.2995,1003.2188)) { SetPlayerPos(playerid,1552.8113,-1675.3368,16.1953); SetPlayerFacingAngle(playerid,84.6264); SetPlayerInterior(playerid,0); } // PD Roof to Garage, Gara to roof etc if(IsPlayerInRangeOfPoint(playerid,1.0,214.0999,125.7107,1003.2188)) // Garage Spawn from inside { if(PlayerInfo[playerid][pFaction] == 1 || PlayerInfo[playerid][pLeader] == 1) { SetPlayerPos(playerid,1554.3206,-1677.9681,6.2188); SetPlayerFacingAngle(playerid,271.3980); SetPlayerInterior(playerid,0); } } if(IsPlayerInRangeOfPoint(playerid,1.0,217.0594,125.8019,1003.2188)) // Roof Spawn From Inside { if(PlayerInfo[playerid][pFaction] == 1 || PlayerInfo[playerid][pLeader] == 1) { SetPlayerPos(playerid,1574.0359,-1675.4767,28.3955); SetPlayerFacingAngle(playerid,267.5743); SetPlayerInterior(playerid,0); } } if(IsPlayerInRangeOfPoint(playerid,1.0,1552.5898,-1677.9690,6.2188)) // Inside Spawn { if(PlayerInfo[playerid][pFaction] == 1 || PlayerInfo[playerid][pLeader] == 1) { SetPlayerPos(playerid,215.3482,124.8738,1003.2188); SetPlayerFacingAngle(playerid,183.1419); SetPlayerInterior(playerid,10); } } if(IsPlayerInRangeOfPoint(playerid,1.0,1571.8706,-1675.5492,28.3955)) // Inside Spawn { if(PlayerInfo[playerid][pFaction] == 1 || PlayerInfo[playerid][pLeader] == 1) { SetPlayerPos(playerid,215.3482,124.8738,1003.2188); SetPlayerFacingAngle(playerid,183.1419); SetPlayerInterior(playerid,10); } } if(IsPlayerInRangeOfPoint(playerid,1.0,1558.0908,-1675.5249,28.3955)) // Garage Spawn from roof { if(PlayerInfo[playerid][pFaction] == 1 || PlayerInfo[playerid][pLeader] == 1) { SetPlayerPos(playerid,1526.3611,-1677.8269,5.8906); SetPlayerFacingAngle(playerid,263.0423); SetPlayerInterior(playerid,0); } } if(IsPlayerInRangeOfPoint(playerid,1.0,1524.4833,-1677.8240,6.2188)) // Roof Spawn From Garage { if(PlayerInfo[playerid][pFaction] == 1 || PlayerInfo[playerid][pLeader] == 1) { SetPlayerPos(playerid,1556.2576,-1675.4427,28.3955); SetPlayerFacingAngle(playerid,89.8313); SetPlayerInterior(playerid,0); } } new Keys,ud,lr; if(IsPlayerInRangeOfPoint(playerid,0.8,240.2464,116.2381,1003.2257)) { if(GetPlayerKeys(playerid,Keys,ud,lr)) { if(Keys == 16) { if(PlayerInfo[playerid][pFaction] == 1 || PlayerInfo[playerid][pLeader] == 1) { SetPlayerPos(playerid,240.4884,116.2737,1003.2257); SetPlayerFacingAngle(playerid,92.0886); ApplyAnimation(playerid,"HEIST9","Use_SwipeCard",4.0,0,0,0,0,0); MoveObject(lspddoor1,239.50000000,120.09999847,1002.20001221,6.0); MoveObject(lspddoor2,239.60000610,114.90000153,1002.20001221,6.0); SetTimer("CloseLSPDDoor1",3000,false); } } } } if(IsPlayerInRangeOfPoint(playerid,0.8,252.5480,110.3099,1003.2188)) { if(GetPlayerKeys(playerid,Keys,ud,lr)) { if(Keys == 16) { if(PlayerInfo[playerid][pFaction] == 1 || PlayerInfo[playerid][pLeader] == 1) { SetPlayerPos(playerid,252.3218,110.4384,1003.2188); SetPlayerFacingAngle(playerid,266.5125); ApplyAnimation(playerid,"HEIST9","Use_SwipeCard",4.0,0,0,0,0,0); MoveObject(lspddoor3,253.19999695,111.59999847,1002.20001221,6.0); MoveObject(lspddoor4,253.19999695,106.50000000,1002.20001221,6.0); SetTimer("CloseLSPDDoor2",3000,false); } } } } if(IsPlayerInRangeOfPoint(playerid,0.8,238.1922,118.3208,1003.2188)) { if(GetPlayerKeys(playerid,Keys,ud,lr)) { if(Keys == 16) { if(PlayerInfo[playerid][pFaction] == 1 || PlayerInfo[playerid][pLeader] == 1) { SetPlayerPos(playerid,238.6642,118.7351,1003.2188); SetPlayerFacingAngle(playerid,268.0794); ApplyAnimation(playerid,"HEIST9","Use_SwipeCard",4.0,0,0,0,0,0); MoveObject(lspddoor1,239.50000000,120.09999847,1002.20001221,6.0); MoveObject(lspddoor2,239.60000610,114.90000153,1002.20001221,6.0); SetTimer("CloseLSPDDoor1",3000,false); } } } } if(IsPlayerInRangeOfPoint(playerid,0.8,254.2835,108.2115,1003.2257)) { if(GetPlayerKeys(playerid,Keys,ud,lr)) { if(Keys == 16) { if(PlayerInfo[playerid][pFaction] == 1 || PlayerInfo[playerid][pLeader] == 1) { SetPlayerPos(playerid,254.1906,107.7826,1003.2257); SetPlayerFacingAngle(playerid,96.4522); ApplyAnimation(playerid,"HEIST9","Use_SwipeCard",4.0,0,0,0,0,0); MoveObject(lspddoor3,253.19999695,111.59999847,1002.20001221,6.0); MoveObject(lspddoor4,253.19999695,106.50000000,1002.20001221,6.0); SetTimer("CloseLSPDDoor2",3000,false); } } } } // LSPD Gates if(IsPlayerInRangeOfPoint(playerid,3.0,1540.7709,-1627.4595,13.3828)) // LSPDgate1 { if(IsPlayerInAnyVehicle(playerid)) { if(GetPlayerKeys(playerid,Keys,ud,lr)) { if(Keys == 2) { if(PlayerInfo[playerid][pFaction] == 1 || PlayerInfo[playerid][pLeader] == 1) { MoveObject(lspdgate1,1544.09997559,-1632.50000000,12.39999962,4.0); SetTimer("CloseLSPDGate1",3000,false); } } } } } if(IsPlayerInRangeOfPoint(playerid,3.0,1547.2313,-1627.9692,13.3828)) // LSPDgate1 { if(IsPlayerInAnyVehicle(playerid)) { if(GetPlayerKeys(playerid,Keys,ud,lr)) { if(Keys == 2) { if(PlayerInfo[playerid][pFaction] == 1 || PlayerInfo[playerid][pLeader] == 1) { MoveObject(lspdgate1,1544.09997559,-1632.50000000,12.39999962,4.0); SetTimer("CloseLSPDGate1",3000,false); } } } } } if(IsPlayerInRangeOfPoint(playerid,3.0,1588.4768,-1634.8383,13.3828)) // LSPDgate2 { if(IsPlayerInAnyVehicle(playerid)) { if(GetPlayerKeys(playerid,Keys,ud,lr)) { if(Keys == 2) { if(PlayerInfo[playerid][pFaction] == 1 || PlayerInfo[playerid][pLeader] == 1) { MoveObject(lspdgate2,1586.69995117,-1638.19995117,20.39999962,4.0); SetTimer("CloseLSPDGate2",3000,false); } } } } } if(IsPlayerInRangeOfPoint(playerid,3.0,1588.9160,-1642.4055,12.7758)) // LSPDgate2 { if(IsPlayerInAnyVehicle(playerid)) { if(GetPlayerKeys(playerid,Keys,ud,lr)) { if(Keys == 2) { if(PlayerInfo[playerid][pFaction] == 1 || PlayerInfo[playerid][pLeader] == 1) { MoveObject(lspdgate2,1586.69995117,-1638.19995117,20.39999962,4.0); SetTimer("CloseLSPDGate2",3000,false); } } } } } if(IsPlayerInRangeOfPoint(playerid,1.5,1544.0807,-1624.8009,13.3828)) // LSPDgate1 { if(PlayerInfo[playerid][pFaction] == 1 || PlayerInfo[playerid][pLeader] == 1) { MoveObject(lspdgate1,1544.09997559,-1632.50000000,12.39999962,4.0); SetTimer("CloseLSPDGate1",3000,false); } } if(IsPlayerInRangeOfPoint(playerid,1.5,1583.5065,-1638.2456,13.3543)) // LSPDgate2 { if(PlayerInfo[playerid][pFaction] == 1 || PlayerInfo[playerid][pLeader] == 1) { MoveObject(lspdgate2,1586.69995117,-1638.19995117,20.39999962,4.0); SetTimer("CloseLSPDGate2",3000,false); } } return 1; } public OnPlayerStreamIn(playerid, forplayerid) { return 1; } public OnPlayerStreamOut(playerid, forplayerid) { return 1; } public OnVehicleStreamIn(vehicleid, forplayerid) { return 1; } public OnVehicleStreamOut(vehicleid, forplayerid) { return 1; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { switch(dialogid) { case DIALOG_REGISTER: { if(!response) return Kick(playerid); if(response) { if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Registering...","You have entered an invalid password.\nType your password below to register a new account.","Register","Quit"); new INI:File = INI_Open(UserPath(playerid)); new Name[MAX_PLAYER_NAME],string[128]; INI_SetTag(File,"data"); INI_WriteInt(File,"Password",udb_hash(inputtext)); INI_WriteInt(File,"Logged",0); INI_WriteInt(File,"Cash",3000); INI_WriteInt(File,"Admin",0); INI_WriteInt(File,"Wanted",0); INI_WriteInt(File,"Faction",0); INI_WriteInt(File,"Rank",0); INI_WriteInt(File,"Leader",0); INI_WriteInt(File,"FWarns",0); INI_WriteInt(File,"Skin",250); INI_WriteInt(File,"Kills",0); INI_WriteInt(File,"Deaths",0); INI_WriteInt(File,"Banned",0); INI_Close(File); SetTimer("Spawn",1,false); ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,"Success!","Great! You are now registered!","Ok",""); GetPlayerName(playerid,Name,sizeof(Name)); format(string,sizeof(string),"%s has registered.",Name); print(string); format(string,sizeof(string),"Welcome %s",Name); SendClientMessage(playerid,COLOR_WHITE,string); PlayerInfo[playerid][pLogged] = 1; a_SpawnPlayer(playerid); if(PlayerInfo[playerid][pAdmin] > 0) { format(string,sizeof(string),"SERVER: You are logged in as Level %d Admin.",PlayerInfo[playerid][pAdmin]); SendClientMessage(playerid,COLOR_WHITE,string); } } } case DIALOG_LOGIN: { if(!response) return Kick(playerid ); if(response) { if(udb_hash(inputtext) == PlayerInfo[playerid][pPass]) { INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid); if(PlayerInfo[playerid][pBanned] == 1) { GameTextForPlayer(playerid,"~w~This account is ~r~banned",20000,1); Kick(playerid); } GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]); ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,"Success!","You have successfully logged in!","Ok",""); new Name[MAX_PLAYER_NAME],string[128]; GetPlayerName(playerid,Name,sizeof(Name)); format(string,sizeof(string),"%s has logged in.",Name); print(string); format(string,sizeof(string),"Welcome %s",Name); SendClientMessage(playerid,COLOR_WHITE,string); PlayerInfo[playerid][pLogged] = 1; a_SpawnPlayer(playerid); if(PlayerInfo[playerid][pAdmin] > 0) { format(string,sizeof(string),"SERVER: You are logged in as Level %d Admin.",PlayerInfo[playerid][pAdmin]); SendClientMessage(playerid,COLOR_WHITE,string); } } else { ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,"Login","You have entered an incorrect password.\nType your password below to login.","Login","Quit"); } return 1; } return 1; } } if(dialogid==DIALOG_VEHICLES && response==1) { new Float:x,Float:y,Float:z,car; switch(listitem) { case 0: { GetPlayerPos(playerid,x,y,z); car = CreateVehicle(411,x-3.0,y,z,0.0,1,1,300); PutPlayerInVehicle(playerid,car,0); new Name[MAX_PLAYER_NAME]; GetPlayerName(playerid,Name,sizeof(Name)); SetVehicleNumberPlate(car,Name); } case 1: { GetPlayerPos(playerid,x,y,z); car = CreateVehicle(451,x-3.0,y,z,0.0,1,3,300); PutPlayerInVehicle(playerid,car,0); new Name[MAX_PLAYER_NAME]; GetPlayerName(playerid,Name,sizeof(Name)); SetVehicleNumberPlate(car,Name); } case 2: { GetPlayerPos(playerid,x,y,z); car = CreateVehicle(429,x-3.0,y,z,0.0,1,0,300); PutPlayerInVehicle(playerid,car,0); new Name[MAX_PLAYER_NAME]; GetPlayerName(playerid,Name,sizeof(Name)); SetVehicleNumberPlate(car,Name); } case 3: { GetPlayerPos(playerid,x,y,z); car = CreateVehicle(592,x-3.0,y,z,0.0,0,1,300); PutPlayerInVehicle(playerid,car,0); new Name[MAX_PLAYER_NAME]; GetPlayerName(playerid,Name,sizeof(Name)); SetVehicleNumberPlate(car,Name); } case 4: { GetPlayerPos(playerid,x,y,z); car = CreateVehicle(562,x-3.0,y,z,0.0,1,1,300); PutPlayerInVehicle(playerid,car,0); new Name[MAX_PLAYER_NAME]; GetPlayerName(playerid,Name,sizeof(Name)); SetVehicleNumberPlate(car,Name); } } } return 1; } public OnPlayerClickPlayer(playerid, clickedplayerid, source) { return 1; } forward LoadUser_data(playerid,name[],value[]); public LoadUser_data(playerid,name[],value[]) { INI_Int("Password",PlayerInfo[playerid][pPass]); INI_Int("Cash",PlayerInfo[playerid][pCash]); INI_Int("Admin",PlayerInfo[playerid][pAdmin]); INI_Int("Wanted",PlayerInfo[playerid][pWanted]); INI_Int("Faction",PlayerInfo[playerid][pFaction]); INI_Int("Rank",PlayerInfo[playerid][pRank]); INI_Int("Leader",PlayerInfo[playerid][pLeader]); INI_Int("FWarns",PlayerInfo[playerid][pFWarns]); INI_Int("Skin",PlayerInfo[playerid][pSkin]); INI_Int("Kills",PlayerInfo[playerid][pKills]); INI_Int("Deaths",PlayerInfo[playerid][pDeaths]); INI_Int("Banned",PlayerInfo[playerid][pBanned]); return 1; } forward OnPlayerUpdateEx(playerid); public OnPlayerUpdateEx(playerid) { if(IsPlayerInAnyVehicle(playerid)) { if(godcar[playerid] == true) { RepairVehicle(GetPlayerVehicleID(playerid)); SetVehicleHealth(GetPlayerVehicleID(playerid), 1000); } } } forward CloseLSPDDoor1(); public CloseLSPDDoor1() { MoveObject(lspddoor1,239.50000000,119.09999847,1002.20001221,6.0); MoveObject(lspddoor2,239.60000610,116.09999847,1002.20001221,6.0); } forward CloseLSPDDoor2(); public CloseLSPDDoor2() { MoveObject(lspddoor3,253.19999695,110.59999847,1002.20001221,6.0); MoveObject(lspddoor4,253.19999695,107.59999847,1002.20001221,6.0); } forward CloseLSPDGate1(); public CloseLSPDGate1() { MoveObject(lspdgate1,1544.09997559,-1623.50000000,12.39999962,4.0); } forward CloseLSPDGate2(); public CloseLSPDGate2() { MoveObject(lspdgate2,1586.69995117,-1638.19995117,15.10000038,4.0); } forward CurrentTime(playerid); public CurrentTime(playerid) { new h,m,s; gettime(h,m,s); SetPlayerTime(playerid,h,m); } stock a_SpawnPlayer(playerid) { if(PlayerInfo[playerid][pFaction] == 0) { SetSpawnInfo(playerid,0,PlayerInfo[playerid][pSkin],1309.9510,-1368.3278,13.5474,184.3216,0,0,0,0,0,0); SpawnPlayer(playerid); } if(PlayerInfo[playerid][pFaction] == 1 || PlayerInfo[playerid][pLeader] == 1) { SetSpawnInfo(playerid,0,PlayerInfo[playerid][pSkin],228.6125,110.3943,1003.2188,90.0000,41,500,0,0,0,0); SetPlayerInterior(playerid,10); SpawnPlayer(playerid); SetPlayerFacingAngle(playerid,356.5215); } } stock SendMessageToAdmins(color,msg[]) { foreach(new i : Player) { if(PlayerInfo[i][pAdmin] > 0) { SendClientMessage(i,color,msg); print(msg); } } } stock a_GivePlayerMoney(playerid, money) { PlayerInfo[playerid][pCash] += money; GivePlayerMoney(playerid, money); } stock UserPath(playerid) { new string[128],playername[MAX_PLAYER_NAME]; GetPlayerName(playerid,playername,sizeof(playername)); format(string,sizeof(string),PATH,playername); return string; } stock udb_hash(buf[]) { new length=strlen(buf); new s1 = 1; new s2 = 0; new n; for (n=0; n<length; n++) { s1 = (s1 + buf[n]) % 65521; s2 = (s2 + s1) % 65521; } return (s2 << 16) + s1; } stock ProxDetector(playerid, Float:radius, string[], col1, col2, col3, col4, col5) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); new Float:ix, Float:iy, Float:iz; new Float:cx, Float:cy, Float:cz; foreach(Player, i) { if(GetPlayerInterior(playerid) == GetPlayerInterior(i) && GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i)) { GetPlayerPos(i, ix, iy, iz); cx = (x - ix); cy = (y - iy); cz = (z - iz); if(((cx < radius/16) && (cx > -radius/16)) && ((cy < radius/16) && (cy > -radius/16)) && ((cz < radius/16) && (cz > -radius/16))) { SendClientMessage(i, col1, string); } else if(((cx < radius/8) && (cx > -radius/8)) && ((cy < radius/8) && (cy > -radius/8)) && ((cz < radius/8) && (cz > -radius/8))) { SendClientMessage(i, col2, string); } else if(((cx < radius/4) && (cx > -radius/4)) && ((cy < radius/4) && (cy > -radius/4)) && ((cz < radius/4) && (cz > -radius/4))) { SendClientMessage(i, col3, string); } else if(((cx < radius/2) && (cx > -radius/2)) && ((cy < radius/2) && (cy > -radius/2)) && ((cz < radius/2) && (cz > -radius/2))) { SendClientMessage(i, col4, string); } else if(((cx < radius) && (cx > -radius)) && ((cy < radius) && (cy > -radius)) && ((cz < radius) && (cz > -radius))) { SendClientMessage(i, col5, string); } } } return 1; }