#include < a_players >
RemoveBuildingForPlayer(playerid, 16762, -327.6094, 2678.5469, 61.6328, 0.25);RemoveBuildingForPlayer(playerid, 16401, -271.9688, 2662.1953, 61.5859, 0.25);RemoveBuildingForPlayer(playerid, 16400, -327.6094, 2678.5469, 61.6328, 0.25);RemoveBuildingForPlayer(playerid, 11548, -1299.7344, 2709.1094, 49.0781, 0.25);RemoveBuildingForPlayer(playerid, 3365, -1425.2344, 2581.2656, 54.8359, 0.25);RemoveBuildingForPlayer(playerid, 3292, -1425.2344, 2581.2656, 54.8359, 0.25);RemoveBuildingForPlayer(playerid, 3293, -1420.5469, 2583.9453, 58.0313, 0.25);RemoveBuildingForPlayer(playerid, 3294, -1420.5469, 2591.1563, 57.7422, 0.25);RemoveBuildingForPlayer(playerid, 16607, -733.1953, 2751.1953, 46.2188, 0.25);RemoveBuildingForPlayer(playerid, 652, -883.3125, 2738.9219, 45.1328, 0.25);RemoveBuildingForPlayer(playerid, 652, -861.9063, 2740.7422, 44.6797, 0.25);RemoveBuildingForPlayer(playerid, 652, -830.2891, 2742.8750, 44.7188, 0.25);RemoveBuildingForPlayer(playerid, 652, -810.9219, 2743.5625, 44.9531, 0.25);RemoveBuildingForPlayer(playerid, 16004, -843.8359, 2746.0078, 47.7109, 0.25);RemoveBuildingForPlayer(playerid, 3243, -864.7656, 2747.5547, 45.1406, 0.25);RemoveBuildingForPlayer(playerid, 3243, -878.2344, 2746.2656, 45.1406, 0.25);RemoveBuildingForPlayer(playerid, 3243, -815.8672, 2751.4141, 45.1406, 0.25);RemoveBuildingForPlayer(playerid, 3243, -827.1328, 2750.7422, 45.1406, 0.25);RemoveBuildingForPlayer(playerid, 3243, -865.9219, 2763.5469, 45.1406, 0.25);RemoveBuildingForPlayer(playerid, 3243, -878.8594, 2762.5156, 45.1406, 0.25);RemoveBuildingForPlayer(playerid, 3243, -828.8672, 2766.4609, 45.1406, 0.25);RemoveBuildingForPlayer(playerid, 3243, -817.5625, 2767.2656, 45.1406, 0.25);RemoveBuildingForPlayer(playerid, 3243, -840.3516, 2763.8359, 45.1406, 0.25);RemoveBuildingForPlayer(playerid, 3243, -850.4375, 2763.0313, 45.1406, 0.25);RemoveBuildingForPlayer(playerid, 1468, -809.2344, 2772.5469, 46.2344, 0.25);RemoveBuildingForPlayer(playerid, 1468, -806.4922, 2769.9688, 46.2344, 0.25);RemoveBuildingForPlayer(playerid, 1468, -814.5156, 2772.4219, 46.2344, 0.25);RemoveBuildingForPlayer(playerid, 1468, -825.1016, 2772.1563, 46.2344, 0.25);RemoveBuildingForPlayer(playerid, 1468, -830.3984, 2771.9766, 46.2344, 0.25);RemoveBuildingForPlayer(playerid, 16107, -733.1953, 2751.1953, 46.2188, 0.25);RemoveBuildingForPlayer(playerid, 16776, -237.0234, 2662.8359, 62.6094, 0.25);RemoveBuildingForPlayer(playerid, 1340, -197.4922, 2659.9141, 62.8203, 0.25);RemoveBuildingForPlayer(playerid, 16062, -222.6641, 2663.3047, 66.2344, 0.25);RemoveBuildingForPlayer(playerid, 16063, -222.3438, 2663.4531, 71.0156, 0.25);RemoveBuildingForPlayer(playerid, 669, -206.6328, 2672.2422, 61.8438, 0.25);RemoveBuildingForPlayer(playerid, 672, -243.0313, 2688.3047, 62.4844, 0.25);RemoveBuildingForPlayer(playerid, 669, -232.1641, 2685.2734, 61.8438, 0.25);RemoveBuildingForPlayer(playerid, 669, -202.5703, 2687.9688, 61.8438, 0.25);RemoveBuildingForPlayer(playerid, 3297, -147.7891, 2684.8125, 63.2188, 0.25);RemoveBuildingForPlayer(playerid, 669, -156.0234, 2675.2031, 61.8438, 0.25);RemoveBuildingForPlayer(playerid, 3242, -147.7891, 2684.8125, 63.2188, 0.25);RemoveBuildingForPlayer(playerid, 700, -1375.3594, 2630.2734, 53.1719, 0.25);RemoveBuildingForPlayer(playerid, 669, -1368.5938, 2635.2422, 51.7344, 0.25);RemoveBuildingForPlayer(playerid, 11455, -1505.4609, 2539.4922, 56.7891, 0.25);RemoveBuildingForPlayer(playerid, 11611, -1383.5547, 2616.5234, 56.6797, 0.25);RemoveBuildingForPlayer(playerid, 11453, -1414.5078, 2650.4844, 57.5625, 0.25);RemoveBuildingForPlayer(playerid, 16077, 594.9297, 926.4141, -41.1953, 0.25);RemoveBuildingForPlayer(playerid, 672, -240.8359, 2737.1484, 62.4844, 0.25);RemoveBuildingForPlayer(playerid, 14872, 280.1406, 304.4219, 998.6016, 0.25);RemoveBuildingForPlayer(playerid, 14875, 280.5313, 308.1563, 1003.2188, 0.25);RemoveBuildingForPlayer(playerid, 14873, 281.2813, 310.6406, 998.9688, 0.25);RemoveBuildingForPlayer(playerid, 700, -1441.7891, 2647.3281, 55.2266, 0.25);RemoveBuildingForPlayer(playerid, 3342, -1447.2344, 2653.3047, 54.8203, 0.25);RemoveBuildingForPlayer(playerid, 669, -1457.8672, 2648.9922, 55.2422, 0.25);RemoveBuildingForPlayer(playerid, 700, -1441.7891, 2647.3281, 55.2266, 0.25);RemoveBuildingForPlayer(playerid, 3173, -1447.2344, 2653.3047, 54.8203, 0.25);RemoveBuildingForPlayer(playerid, 3343, -640.4766, 2717.1953, 71.2656, 0.25);RemoveBuildingForPlayer(playerid, 3961, -791.3203, 501.1563, 1368.3438, 0.25);RemoveBuildingForPlayer(playerid, 4024, 1479.8672, -1790.3984, 56.0234, 0.25);RemoveBuildingForPlayer(playerid, 4044, 1481.1875, -1785.0703, 22.3828, 0.25);RemoveBuildingForPlayer(playerid, 4002, 1479.8672, -1790.3984, 56.0234, 0.25);RemoveBuildingForPlayer(playerid, 3980, 1481.1875, -1785.0703, 22.3828, 0.25);RemoveBuildingForPlayer(playerid, 4003, 1481.0781, -1747.0313, 33.5234, 0.25);
public OnPlayerConnect(playerid){RemoveBuildingForPlayer(playerid, 16762, -327.6094, 2678.5469, 61.6328, 0.25);RemoveBuildingForPlayer(playerid, 16401, -271.9688, 2662.1953, 61.5859, 0.25);RemoveBuildingForPlayer(playerid, 16400, -327.6094, 2678.5469, 61.6328, 0.25);RemoveBuildingForPlayer(playerid, 11548, -1299.7344, 2709.1094, 49.0781, 0.25);RemoveBuildingForPlayer(playerid, 3365, -1425.2344, 2581.2656, 54.8359, 0.25);RemoveBuildingForPlayer(playerid, 3292, -1425.2344, 2581.2656, 54.8359, 0.25);RemoveBuildingForPlayer(playerid, 3293, -1420.5469, 2583.9453, 58.0313, 0.25);RemoveBuildingForPlayer(playerid, 3294, -1420.5469, 2591.1563, 57.7422, 0.25);RemoveBuildingForPlayer(playerid, 16607, -733.1953, 2751.1953, 46.2188, 0.25);RemoveBuildingForPlayer(playerid, 652, -883.3125, 2738.9219, 45.1328, 0.25);RemoveBuildingForPlayer(playerid, 652, -861.9063, 2740.7422, 44.6797, 0.25);RemoveBuildingForPlayer(playerid, 652, -830.2891, 2742.8750, 44.7188, 0.25);RemoveBuildingForPlayer(playerid, 652, -810.9219, 2743.5625, 44.9531, 0.25);RemoveBuildingForPlayer(playerid, 16004, -843.8359, 2746.0078, 47.7109, 0.25);RemoveBuildingForPlayer(playerid, 3243, -864.7656, 2747.5547, 45.1406, 0.25);RemoveBuildingForPlayer(playerid, 3243, -878.2344, 2746.2656, 45.1406, 0.25);RemoveBuildingForPlayer(playerid, 3243, -815.8672, 2751.4141, 45.1406, 0.25);RemoveBuildingForPlayer(playerid, 3243, -827.1328, 2750.7422, 45.1406, 0.25);RemoveBuildingForPlayer(playerid, 3243, -865.9219, 2763.5469, 45.1406, 0.25);RemoveBuildingForPlayer(playerid, 3243, -878.8594, 2762.5156, 45.1406, 0.25);RemoveBuildingForPlayer(playerid, 3243, -828.8672, 2766.4609, 45.1406, 0.25);RemoveBuildingForPlayer(playerid, 3243, -817.5625, 2767.2656, 45.1406, 0.25);RemoveBuildingForPlayer(playerid, 3243, -840.3516, 2763.8359, 45.1406, 0.25);RemoveBuildingForPlayer(playerid, 3243, -850.4375, 2763.0313, 45.1406, 0.25);RemoveBuildingForPlayer(playerid, 1468, -809.2344, 2772.5469, 46.2344, 0.25);RemoveBuildingForPlayer(playerid, 1468, -806.4922, 2769.9688, 46.2344, 0.25);RemoveBuildingForPlayer(playerid, 1468, -814.5156, 2772.4219, 46.2344, 0.25);RemoveBuildingForPlayer(playerid, 1468, -825.1016, 2772.1563, 46.2344, 0.25);RemoveBuildingForPlayer(playerid, 1468, -830.3984, 2771.9766, 46.2344, 0.25);RemoveBuildingForPlayer(playerid, 16107, -733.1953, 2751.1953, 46.2188, 0.25);RemoveBuildingForPlayer(playerid, 16776, -237.0234, 2662.8359, 62.6094, 0.25);RemoveBuildingForPlayer(playerid, 1340, -197.4922, 2659.9141, 62.8203, 0.25);RemoveBuildingForPlayer(playerid, 16062, -222.6641, 2663.3047, 66.2344, 0.25);RemoveBuildingForPlayer(playerid, 16063, -222.3438, 2663.4531, 71.0156, 0.25);RemoveBuildingForPlayer(playerid, 669, -206.6328, 2672.2422, 61.8438, 0.25);RemoveBuildingForPlayer(playerid, 672, -243.0313, 2688.3047, 62.4844, 0.25);RemoveBuildingForPlayer(playerid, 669, -232.1641, 2685.2734, 61.8438, 0.25);RemoveBuildingForPlayer(playerid, 669, -202.5703, 2687.9688, 61.8438, 0.25);RemoveBuildingForPlayer(playerid, 3297, -147.7891, 2684.8125, 63.2188, 0.25);RemoveBuildingForPlayer(playerid, 669, -156.0234, 2675.2031, 61.8438, 0.25);RemoveBuildingForPlayer(playerid, 3242, -147.7891, 2684.8125, 63.2188, 0.25);RemoveBuildingForPlayer(playerid, 700, -1375.3594, 2630.2734, 53.1719, 0.25);RemoveBuildingForPlayer(playerid, 669, -1368.5938, 2635.2422, 51.7344, 0.25);RemoveBuildingForPlayer(playerid, 11455, -1505.4609, 2539.4922, 56.7891, 0.25);RemoveBuildingForPlayer(playerid, 11611, -1383.5547, 2616.5234, 56.6797, 0.25);RemoveBuildingForPlayer(playerid, 11453, -1414.5078, 2650.4844, 57.5625, 0.25);RemoveBuildingForPlayer(playerid, 16077, 594.9297, 926.4141, -41.1953, 0.25);RemoveBuildingForPlayer(playerid, 672, -240.8359, 2737.1484, 62.4844, 0.25);RemoveBuildingForPlayer(playerid, 14872, 280.1406, 304.4219, 998.6016, 0.25);RemoveBuildingForPlayer(playerid, 14875, 280.5313, 308.1563, 1003.2188, 0.25);RemoveBuildingForPlayer(playerid, 14873, 281.2813, 310.6406, 998.9688, 0.25);RemoveBuildingForPlayer(playerid, 700, -1441.7891, 2647.3281, 55.2266, 0.25);RemoveBuildingForPlayer(playerid, 3342, -1447.2344, 2653.3047, 54.8203, 0.25);RemoveBuildingForPlayer(playerid, 669, -1457.8672, 2648.9922, 55.2422, 0.25);RemoveBuildingForPlayer(playerid, 700, -1441.7891, 2647.3281, 55.2266, 0.25);RemoveBuildingForPlayer(playerid, 3173, -1447.2344, 2653.3047, 54.8203, 0.25);RemoveBuildingForPlayer(playerid, 3343, -640.4766, 2717.1953, 71.2656, 0.25);RemoveBuildingForPlayer(playerid, 3961, -791.3203, 501.1563, 1368.3438, 0.25);RemoveBuildingForPlayer(playerid, 4024, 1479.8672, -1790.3984, 56.0234, 0.25);RemoveBuildingForPlayer(playerid, 4044, 1481.1875, -1785.0703, 22.3828, 0.25);RemoveBuildingForPlayer(playerid, 4002, 1479.8672, -1790.3984, 56.0234, 0.25);RemoveBuildingForPlayer(playerid, 3980, 1481.1875, -1785.0703, 22.3828, 0.25);RemoveBuildingForPlayer(playerid, 4003, 1481.0781, -1747.0313, 33.5234, 0.25);new RPName[MAX_PLAYER_NAME];GetPlayerName(playerid, RPName, sizeof(RPName)); Nevekki(playerid);if(IsRolePlayName(RPName)) {format(File, sizeof(File), \"Jatekos/%s.ini\", SimaNev(playerid));if(dini_Exists(File)) { pInfo[playerid][pBanned] = dini_Int(File, \"Bann\"); } if(pInfo[playerid][pBanned] == 0){ SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL_SILENCED, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_SHOTGUN, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_MP5, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_AK47, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_M4, 1); SendClientMessage(playerid, NARANCS, \" \"), SendClientMessage(playerid, NARANCS, \" \"); SendClientMessage(playerid, NARANCS, \" \"), SendClientMessage(playerid, NARANCS, \" \"); SendClientMessage(playerid, NARANCS, \" \"), SendClientMessage(playerid, NARANCS, \" \"); SendClientMessage(playerid, NARANCS, \" \"), SendClientMessage(playerid, NARANCS, \" \"); SendClientMessage(playerid, NARANCS, \" \"), SendClientMessage(playerid, NARANCS, \" \"); SendClientMessage(playerid, NARANCS, \" \"), SendClientMessage(playerid, NARANCS, \" \"); SendClientMessage(playerid, NARANCS, \" \"), SendClientMessage(playerid, NARANCS, \" \"); SendClientMessage(playerid, NARANCS, \" \"), SendClientMessage(playerid, NARANCS, \" \"); SendClientMessage(playerid, NARANCS, \" \"), SendClientMessage(playerid, NARANCS, \" \"); SendClientMessage(playerid, FONTOS, \"Szerver tölt!Kérlek várj!\"); SendClientMessage(playerid, FONTOS, \"A szerver betöltött!Jó játékot kivánunk!\"); Tutorial[playerid] = 0; AntiCheatTimer[playerid] = SetTimerEx(\"AntiCheat\", 1000, true, \"d\", playerid);}else{ new S[128]; format(S, sizeof(S), \"[AC] %s tiltott karakterrel akart belépni \", Nev(playerid)); SendAdminMessage(FONTOS, S); SendClientMessage(playerid, PIROS, \"A karaktered zárolva van! Írhatsz kérelmet a fórumra!\"); Kick(playerid);}}else{ SendClientMessage(playerid, PIROS, \"Sajnos, nem megfelelő a neved! ( Példa: Randal_Brook )\"); Kick(playerid);} SetTimerEx(\"CheckMoney\", 2000, true, \"i\", playerid); drogotszed[playerid] = 0; drogotgyart[playerid] = 0; matitgyart[playerid] = 0; fegyvertgyart[playerid] = 0; zsakjavan[playerid] = 0; zsakvisel[playerid] = -1; vizvisel[playerid] = -1; pajzsvisel[playerid] = -1;mellenyvisel[playerid] = -1;sokkolovisel[playerid] = -1;lampavisel[playerid] = -1;csavarhuzovisel[playerid] = -1;kalapacsvisel[playerid] = -1; sisakvisel[playerid] = -1; pecavisel[playerid] = -1; beszorult[playerid] = 0;uzi1[playerid] = 0;Serult[playerid] = false;animotkapot1[playerid] = 0;animotkapot2[playerid] = 0;Pecazik[playerid] = 0;Pecabot[playerid] = 1;Csali[playerid] = 1;Kifoghatja[playerid] = 0;Sokkoloeloveve[playerid] = 0;pInfo[playerid][pAs] = 0;Reportotirhat[playerid] = 1;return 1;}
C:\\Users\\Martinka\\Desktop\\Defensive\\gamemodes\\Defensive.pwn(1355) : error 017: undefined symbol \"RemoveBuildingForPlayer\"C:\\Users\\Martinka\\Desktop\\Defensive\\gamemodes\\Defensive.pwn(1356) : error 017: undefined symbol \"RemoveBuildingForPlayer\"C:\\Users\\Martinka\\Desktop\\Defensive\\gamemodes\\Defensive.pwn(1357) : error 017: undefined symbol \"RemoveBuildingForPlayer\"C:\\Users\\Martinka\\Desktop\\Defensive\\gamemodes\\Defensive.pwn(1358) : error 017: undefined symbol \"RemoveBuildingForPlayer\"C:\\Users\\Martinka\\Desktop\\Defensive\\gamemodes\\Defensive.pwn(1359) : error 017: undefined symbol \"RemoveBuildingForPlayer\"C:\\Users\\Martinka\\Desktop\\Defensive\\gamemodes\\Defensive.pwn(1360) : error 017: undefined symbol \"RemoveBuildingForPlayer\"C:\\Users\\Martinka\\Desktop\\Defensive\\gamemodes\\Defensive.pwn(1361) : error 017: undefined symbol \"RemoveBuildingForPlayer\"C:\\Users\\Martinka\\Desktop\\Defensive\\gamemodes\\Defensive.pwn(1362) : error 017: undefined symbol \"RemoveBuildingForPlayer\"C:\\Users\\Martinka\\Desktop\\Defensive\\gamemodes\\Defensive.pwn(1363) : error 017: undefined symbol \"RemoveBuildingForPlayer\"C:\\Users\\Martinka\\Desktop\\Defensive\\gamemodes\\Defensive.pwn(1364) : error 017: undefined symbol \"RemoveBuildingForPlayer\"C:\\Users\\Martinka\\Desktop\\Defensive\\gamemodes\\Defensive.pwn(1365) : error 017: undefined symbol \"RemoveBuildingForPlayer\"C:\\Users\\Martinka\\Desktop\\Defensive\\gamemodes\\Defensive.pwn(1366) : error 017: undefined symbol \"RemoveBuildingForPlayer\"C:\\Users\\Martinka\\Desktop\\Defensive\\gamemodes\\Defensive.pwn(1367) : error 017: undefined symbol \"RemoveBuildingForPlayer\"C:\\Users\\Martinka\\Desktop\\Defensive\\gamemodes\\Defensive.pwn(1368) : error 017: undefined symbol \"RemoveBuildingForPlayer\"C:\\Users\\Martinka\\Desktop\\Defensive\\gamemodes\\Defensive.pwn(1369) : error 017: undefined symbol \"RemoveBuildingForPlayer\"C:\\Users\\Martinka\\Desktop\\Defensive\\gamemodes\\Defensive.pwn(1370) : error 017: undefined symbol \"RemoveBuildingForPlayer\"C:\\Users\\Martinka\\Desktop\\Defensive\\gamemodes\\Defensive.pwn(1371) : error 017: undefined symbol \"RemoveBuildingForPlayer\"C:\\Users\\Martinka\\Desktop\\Defensive\\gamemodes\\Defensive.pwn(1372) : error 017: undefined symbol \"RemoveBuildingForPlayer\"C:\\Users\\Martinka\\Desktop\\Defensive\\gamemodes\\Defensive.pwn(1373) : error 017: undefined symbol \"RemoveBuildingForPlayer\"C:\\Users\\Martinka\\Desktop\\Defensive\\gamemodes\\Defensive.pwn(1374) : error 017: undefined symbol \"RemoveBuildingForPlayer\"C:\\Users\\Martinka\\Desktop\\Defensive\\gamemodes\\Defensive.pwn(1375) : error 017: undefined symbol \"RemoveBuildingForPlayer\"C:\\Users\\Martinka\\Desktop\\Defensive\\gamemodes\\Defensive.pwn(1376) : error 017: undefined symbol \"RemoveBuildingForPlayer\"C:\\Users\\Martinka\\Desktop\\Defensive\\gamemodes\\Defensive.pwn(1377) : error 017: undefined symbol \"RemoveBuildingForPlayer\"C:\\Users\\Martinka\\Desktop\\Defensive\\gamemodes\\Defensive.pwn(1378) : error 017: undefined symbol \"RemoveBuildingForPlayer\"C:\\Users\\Martinka\\Desktop\\Defensive\\gamemodes\\Defensive.pwn(1379) : error 017: undefined symbol \"RemoveBuildingForPlayer\"C:\\Users\\Martinka\\Desktop\\Defensive\\gamemodes\\Defensive.pwn(1380) : error 017: undefined symbol \"RemoveBuildingForPlayer\"
// Make sure you don\'t get warnings about tabsize#pragma tabsize 0 // ********************************************************************************************************************// Set default gamemode name// ********************************************************************************************************************#define GameModeName \"[HUN]Fuvar 1000-rel:)\"// ********************************************************************************************************************// ******************************************************************************************************************** // Include default files#include <a_samp>#include <zcmd>#include <dutils>#include <sscanf2>#include <streamer>// Include all define-statements and custom-type declarations and the arrays which use them// These files need to be included before the functions get included, because the functions use the defines, custom types and the arrays// Also include the defined loads (for truckers, military, mafia, ...) and locations arrays#include <PPC_DefTexts>#include <PPC_ServerSettings>#include <PPC_Defines>#include <PPC_DefLocations>#include <PPC_DefLoads>#include <PPC_DefCars>#include <PPC_DefPlanes>#include <PPC_DefTrailers>#include <PPC_DefBuyableVehicles>// Include functions for this gamemode#include <PPC_Common>#include <PPC_Housing>#include <PPC_Business>#include <PPC_GameModeInit>#include <PPC_FileOperations>#include <PPC_Speedometer>#include <PPC_MissionsTrucking>#include <PPC_MissionsBus>#include <PPC_MissionsPilot>#include <PPC_MissionsPolice>#include <PPC_MissionsMafia>#include <PPC_MissionsAssistance>#include <PPC_MissionsCourier>#include <PPC_MissionsRoadworker>#include <PPC_Convoys>#include <PPC_Dialogs>#include <PPC_PlayerCommands>#include <PPC_Toll> // The main function (used only once when the server loads)main(){// Print some standard lines to the server\'s consoleprint(\"\\n----------------------------------\");print(GameModeName);print(\"----------------------------------\\n\");} // This callback gets called when the server initializes the gamemodepublic OnGameModeInit(){new HostCommand[128];// Change the hostnameformat(HostCommand, 128, \"[HUN]-->*Kamionosok és Rendőrök*<--\", GameModeName);SendRconCommand(HostCommand);SetGameModeText(GameModeName); // Set the Mode of the gamemode, which appears in the list of serversGameModeInit_VehiclesPickups(); // Add all static vehicles and pickups when the server starts that are required (also load the houses)GameModeInit_Classes(); // Add character models to the class-selection (without weapons)Convoys_Init(); // Setup textdraws and default data for convoysShowPlayerMarkers(1); // Show players on the entire map (and on the radar)ShowNameTags(1); // Show player names (and health) above their headManualVehicleEngineAndLights(); // Let the server control the vehicle\'s engine and lightsEnableStuntBonusForAll(0); // Disable stunt bonus for all playersDisableInteriorEnterExits(); // Removes all building-entrances in the gameUsePlayerPedAnims(); // Use CJ\'s walking animation// Start the timer that will show timed messages every 2 minutesSetTimer(\"Timer_TimedMessages\", 1000 * 60 * 2, true);// Start the timer that will show a random bonus mission for truckers every 5 minutesSetTimer(\"ShowRandomBonusMission\", 1000 * 60 * 5, true);// Start the timer that checks the toll-gatesSetTimer(\"Toll\", 1000, true);// Fix the bugged houses (after fixing the houses, you can remove this line, as it\'s not needed anymore)FixHouses();return 1;} // This callback gets called when a player connects to the serverpublic OnPlayerConnect(playerid){// Always allow NPC\'s to login without password or accountif (IsPlayerNPC(playerid))return 1;// Setup local variablesnew Name[MAX_PLAYER_NAME], NewPlayerMsg[128], HouseID;// Setup a PVar to allow cross-script money-transfers (only from filterscript to this mainscript) and scorepointsSetPVarInt(playerid, \"PVarMoney\", 0);SetPVarInt(playerid, \"PVarScore\", 0);// Get the playernameGetPlayerName(playerid, Name, sizeof(Name));// Also store this name for the playerGetPlayerName(playerid, APlayerData[playerid][PlayerName], 24);// Send a message to all players to let them know somebody else joined the serverformat(NewPlayerMsg, 128, TXT_PlayerJoinedServer, Name, playerid);SendClientMessageToAll(0xFFFFFFFF, NewPlayerMsg);// Try to load the player\'s datafile (\"PlayerFile_Load\" returns \"1\" is the file has been read, \"0\" when the file cannot be read)if (PlayerFile_Load(playerid) == 1){// Check if the player is still bannedif (APlayerData[playerid][banTime] < gettime()) // Player ban-time is passed ShowPlayerDialog(playerid, DialogLogin, DIALOG_STYLE_INPUT, TXT_DialogLoginTitle, TXT_DialogLoginMsg, TXT_DialogLoginButton1, TXT_DialogButtonCancel);else // Player is still banned{ ShowRemainingBanTime(playerid); // Show the remaining ban-time to the player is days, hours, minutes, seconds Kick(playerid); // Kick the player}}elseShowPlayerDialog(playerid, DialogRegister, DIALOG_STYLE_INPUT, TXT_DialogRegisterTitle, TXT_DialogRegisterMsg, TXT_DialogRegisterButton1, TXT_DialogButtonCancel);// The houses have been loaded but not the cars, so load all vehicles assigned to the player\'s housesfor (new HouseSlot; HouseSlot < MAX_HOUSESPERPLAYER; HouseSlot++){ // Get the HouseID from this slot HouseID = APlayerData[playerid][Houses][HouseSlot]; // Check if there is a house in this slotif (HouseID != 0) HouseFile_Load(HouseID, true); // Load the cars of the house}// Speedometer setupSpeedometer_Setup(playerid);// MissionText TextDraw setupAPlayerData[playerid][MissionText] = TextDrawCreate(320.0, 430.0, \" \"); // Setup the missiontext at the bottom of the screenTextDrawAlignment(APlayerData[playerid][MissionText], 2); // Align the missiontext to the centerTextDrawUseBox(APlayerData[playerid][MissionText], 1); // Set the missiontext to display inside a boxTextDrawBoxColor(APlayerData[playerid][MissionText], 0x00000066); // Set the box color of the missiontext// Display a message if the player hasn\'t accepted the rules yetif (APlayerData[playerid][RulesRead] == false) SendClientMessage(playerid, 0xFFFFFFFF, \"{FF0000}Szerver szabályzat {FFFF00}/rules{FF0000}Parancs\");return 1;} // This function shows the player how long his ban still is when he tries to login (in days, hours, minutes, seconds)ShowRemainingBanTime(playerid){// Setup local variablesnew TotalBanTime, Days, Hours, Minutes, Seconds, Msg[128];// Get the total ban-timeTotalBanTime = APlayerData[playerid][banTime] - gettime();// Calculate daysif (TotalBanTime >= 86400){Days = TotalBanTime / 86400;TotalBanTime = TotalBanTime - (Days * 86400);}// Calculate hoursif (TotalBanTime >= 3600){Hours = TotalBanTime / 3600;TotalBanTime = TotalBanTime - (Hours * 3600);}// Calculate minutesif (TotalBanTime >= 60){Minutes = TotalBanTime / 60;TotalBanTime = TotalBanTime - (Minutes * 60);}// Calculate secondsSeconds = TotalBanTime;// Display the remaining ban-time for this playerSendClientMessage(playerid, 0xFFFFFFFF, TXT_StillBanned);format(Msg, 128, TXT_BannedDuration, Days, Hours, Minutes, Seconds);SendClientMessage(playerid, 0xFFFFFFFF, Msg);} // This callback gets called when a player disconnects from the serverpublic OnPlayerDisconnect(playerid, reason){// Always allow NPC\'s to logout without password or accountif (IsPlayerNPC(playerid))return 1;// Setup local variablesnew Name[24], Msg[128], HouseID;// Get the playernameGetPlayerName(playerid, Name, sizeof(Name));// Stop spectate mode for all players who are spectating this playerfor (new i; i < MAX_PLAYERS; i++) if (IsPlayerConnected(i)) // Check if the player is connected if (GetPlayerState(i) == PLAYER_STATE_SPECTATING) // Check if this player is spectating somebody if (APlayerData[spectateID] == playerid) // Check if this player is spectating me { TogglePlayerSpectating(i, 0); // Turn off spectate-mode APlayerData[spectateID] = INVALID_PLAYER_ID; APlayerData[spectateType] = ADMIN_SPEC_TYPE_NONE; SendClientMessage(i, 0xFFFFFFFF, \"{FF0000}A játékos kilépet a spec befejezödöt\"); }// Send a message to all players to let them know somebody else joined the serverformat(Msg, 128, TXT_PlayerLeftServer, Name, playerid);SendClientMessageToAll(0xFFFFFFFF, Msg);// If the player entered a proper password (the player has an account)if (strlen(APlayerData[playerid][PlayerPassword]) != 0){ // Save the player data and his housesPlayerFile_Save(playerid);}// Stop any job that may have started (this also clears all mission data)switch (APlayerData[playerid][PlayerClass]){case ClassTruckDriver: Trucker_EndJob(playerid); // Stop any trucker jobcase ClassBusDriver: BusDriver_EndJob(playerid); // Stop any busdriver jobcase ClassPilot: Pilot_EndJob(playerid); // Stop any pilot jobcase ClassPolice: Police_EndJob(playerid); // Stop any police jobcase ClassMafia: Mafia_EndJob(playerid); // Stop any mafia jobcase ClassAssistance: Assistance_EndJob(playerid);case ClassRoadWorker: Roadworker_EndJob(playerid);}// If the player is part of a convoy, kick him from itConvoy_Leave(playerid);// Unload all the player\'s house-vehicles to make room for other player\'s vehiclesfor (new HouseSlot; HouseSlot < MAX_HOUSESPERPLAYER; HouseSlot++){ // Get the HouseID from this slot HouseID = APlayerData[playerid][Houses][HouseSlot]; // Check if there is a house in this slotif (HouseID != 0){ // Unload the cars of the house House_RemoveVehicles(HouseID); // Set the house so it cannot be entered by anyone (close the house) AHouseData[HouseID][HouseOpened] = false;}}// Clear the data in the APlayerData array to make sure the next player with the same id doesn\'t hold wrong dataAPlayerData[playerid][spectateID] = -1;APlayerData[playerid][spectateVehicle] = -1;APlayerData[playerid][spectateType] = ADMIN_SPEC_TYPE_NONE;APlayerData[playerid][LoggedIn] = false;APlayerData[playerid][AssistanceNeeded] = false;APlayerData[playerid][PlayerPassword] = 0;APlayerData[playerid][PlayerLevel] = 0;APlayerData[playerid][PlayerJailed] = 0;APlayerData[playerid][PlayerFrozen] = 0; // Clearing this variable automatically kills the frozentimerAPlayerData[playerid][bans] = 0;APlayerData[playerid][banTime] = 0;APlayerData[playerid][Muted] = false;APlayerData[playerid][RulesRead] = false;APlayerData[playerid][AutoReportTime] = 0;APlayerData[playerid][TruckerLicense] = 0;APlayerData[playerid][busLicense] = 0;APlayerData[playerid][PlayerClass] = 0;APlayerData[playerid][Warnings] = 0;APlayerData[playerid][PlayerMoney] = 0;APlayerData[playerid][PlayerScore] = 0;for (new HouseSlot; HouseSlot < MAX_HOUSESPERPLAYER; HouseSlot++)APlayerData[playerid][Houses][HouseSlot] = 0;for (new BusSlot; BusSlot < MAX_BUSINESSPERPLAYER; BusSlot++)APlayerData[playerid][business][busSlot] = 0;APlayerData[playerid][CurrentHouse] = 0;// Clear bank account infoAPlayerData[playerid][bankPassword] = 0;APlayerData[playerid][bankLoggedIn] = false;APlayerData[playerid][bankMoney] = 0;// Clear statsAPlayerData[playerid][statsTruckerJobs] = 0;APlayerData[playerid][statsConvoyJobs] = 0;APlayerData[playerid][statsBusDriverJobs] = 0;APlayerData[playerid][statsPilotJobs] = 0;APlayerData[playerid][statsMafiaJobs] = 0;APlayerData[playerid][statsMafiaStolen] = 0;APlayerData[playerid][statsPoliceFined] = 0;APlayerData[playerid][statsPoliceJailed] = 0;APlayerData[playerid][statsCourierJobs] = 0;APlayerData[playerid][statsRoadworkerJobs] = 0;APlayerData[playerid][statsAssistance] = 0;APlayerData[playerid][statsMetersDriven] = 0.0;// Clear police warningsAPlayerData[playerid][PoliceCanJailMe] = false;APlayerData[playerid][PoliceWarnedMe] = false;APlayerData[playerid][Value_PoliceCanJailMe] = 0;// Make sure the jailtimer has been destroyedKillTimer(APlayerData[playerid][PlayerJailedTimer]);KillTimer(APlayerData[playerid][Timer_PoliceCanJailMe]);// Destroy the speedometer TextDraw for this player and the timer, also set the speed to 0Speedometer_Cleanup(playerid);// Also destroy the missiontext TextDraw for this playerTextDrawDestroy(APlayerData[playerid][MissionText]);// Destroy a rented vehicle is the player had anyif (APlayerData[playerid][RentedVehicleID] != 0){// Clear the data for the already rented vehicleAVehicleData[APlayerData[playerid][RentedVehicleID]][Model] = 0;AVehicleData[APlayerData[playerid][RentedVehicleID]][Fuel] = 0;AVehicleData[APlayerData[playerid][RentedVehicleID]][Owned] = false;AVehicleData[APlayerData[playerid][RentedVehicleID]][Owner] = 0;AVehicleData[APlayerData[playerid][RentedVehicleID]][PaintJob] = 0;for (new j; j < 14; j++){ AVehicleData[APlayerData[playerid][RentedVehicleID]][Components][j] = 0;}// Destroy the vehicleDestroyVehicle(APlayerData[playerid][RentedVehicleID]);// Clear the RentedVehicleIDAPlayerData[playerid][RentedVehicleID] = 0;}return 1;} // This callback gets called whenever a player uses the chat-boxpublic OnPlayerText(playerid, text[]){// Block the player\'s text if he has been muted if (APlayerData[playerid][Muted] == true){// Let the player know he\'s still mutedSendClientMessage(playerid, 0xFFFFFFFF, \"{FF0000}Mutolva vagy\");// Don\'t allow his text to be sent to the chatboxreturn 0;} return 1;} // This callback gets called when a player interacts with a dialogpublic OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){// Select the proper dialog to processswitch (dialogid){case DialogRegister: Dialog_Register(playerid, response, inputtext); // The \"Register\"-dialogcase DialogLogin: Dialog_Login(playerid, response, inputtext); // The \"Login\"-dialogcase DialogStatsOtherPlayer: Dialog_StatsOtherPlayer(playerid, response, listitem);case DialogStatsHouse: Dialog_StatsHouse(playerid, response, listitem);case DialogStatsGoHouse: Dialog_StatsGoHouse(playerid, response, listitem);case DialogStatsGoBusiness: Dialog_StatsGoBusiness(playerid, response, listitem);case DialogRescue: Dialog_Rescue(playerid, response, listitem); // The rescue-dialogcase DialogBuyLicenses: Dialog_BuyLicenses(playerid, response, listitem); // The license-dialog (allows the player to buy trucker/busdriver licenses)case DialogRules: Dialog_Rules(playerid, response);case DialogTruckerJobMethod: Dialog_TruckerSelectJobMethod(playerid, response, listitem); // The work-dialog for truckers (shows the loads he can carry and lets the player choose the load)case DialogTruckerSelectLoad: Dialog_TruckerSelectLoad(playerid, response, listitem); // The load-selection dialog for truckers (shows the startlocations for the selected load and let the player choose his startlocation)case DialogTruckerStartLoc: Dialog_TruckerSelectStartLoc(playerid, response, listitem); // The start-location dialog for truckers (shows the endlocations for the selected load and let the player choose his endlocation)case DialogTruckerEndLoc: Dialog_TruckerSelectEndLoc(playerid, response, listitem); // The end-location dialog for truckers (processes the selected endlocation and starts the job)case DialogBusJobMethod: Dialog_BusSelectJobMethod(playerid, response, listitem); // The work-dialog for busdrivers (process the options to choose own busroute or auto-assigned busroute)case DialogBusSelectRoute: Dialog_BusSelectRoute(playerid, response, listitem); // Choose the busroute and start the jobcase DialogCourierSelectQuant: Dialog_CourierSelectQuant(playerid, response, listitem);case DialogBike: Dialog_Bike(playerid, response, listitem); // The bike-dialogcase DialogCar: Dialog_Car(playerid, response, listitem); // The car-dialog (which uses a split dialog structure)case DialogPlane: Dialog_Plane(playerid, response, listitem); // The plane-dialog (which uses a split dialog structure)case DialogTrailer: Dialog_Trailer(playerid, response, listitem); // The trailer-dialog (which uses a split dialog structure)case DialogBoat: Dialog_Boat(playerid, response, listitem); // The boat-dialogcase DialogRentCarClass: Dialog_RentProcessClass(playerid, response, listitem); // The player chose a vehicleclass from where he can rent a vehiclecase DialogRentCar: Dialog_RentCar(playerid, response, listitem); // The player chose a vehicle from the list of vehicles from the vehicleclass he chose beforecase DialogPlayerCommands: Dialog_PlayerCommands(playerid, response, listitem); // Displays all commands in a split-dialog structurecase DialogPrimaryCarColor: Dialog_PrimaryCarColor(playerid, response, listitem);case DialogSedundaryCarColor: Dialog_SedundaryCarColor(playerid, response, listitem);case DialogWeather: Dialog_Weather(playerid, response, listitem); // The weather dialogcase DialogCarOption: Dialog_CarOption(playerid, response, listitem); // The caroption dialogcase DialogSelectConvoy: Dialog_SelectConvoy(playerid, response, listitem);case DialogHouseMenu: Dialog_HouseMenu(playerid, response, listitem); // Process the main housemenucase DialogUpgradeHouse: Dialog_UpgradeHouse(playerid, response, listitem); // Process the house-upgrade menucase DialogGoHome: Dialog_GoHome(playerid, response, listitem); // Port to one of your housescase DialogHouseNameChange: Dialog_ChangeHouseName(playerid, response, inputtext); // Change the name of your housecase DialogSellHouse: Dialog_SellHouse(playerid, response); // Sell the housecase DialogBuyCarClass: Dialog_BuyCarClass(playerid, response, listitem); // The player chose a vehicleclass from where he can buy a vehiclecase DialogBuyCar: Dialog_BuyCar(playerid, response, listitem); // The player chose a vehicle from the list of vehicles from the vehicleclass he chose beforecase DialogSellCar: Dialog_SellCar(playerid, response, listitem);case DialogBuyInsurance: Dialog_BuyInsurance(playerid, response);case DialogGetCarSelectHouse: Dialog_GetCarSelectHouse(playerid, response, listitem);case DialogGetCarSelectCar: Dialog_GetCarSelectCar(playerid, response, listitem);case DialogUnclampVehicles: Dialog_UnclampVehicles(playerid, response);case DialogCreateBusSelType: Dialog_CreateBusSelType(playerid, response, listitem);case DialogBusinessMenu: Dialog_BusinessMenu(playerid, response, listitem);case DialogGoBusiness: Dialog_GoBusiness(playerid, response, listitem);case DialogBusinessNameChange: Dialog_ChangeBusinessName(playerid, response, inputtext); // Change the name of your businesscase DialogSellBusiness: Dialog_SellBusiness(playerid, response); // Sell the businesscase DialogBankPasswordRegister: Dialog_BankPasswordRegister(playerid, response, inputtext);case DialogBankPasswordLogin: Dialog_BankPasswordLogin(playerid, response, inputtext);case DialogBankOptions: Dialog_BankOptions(playerid, response, listitem);case DialogBankDeposit: Dialog_BankDeposit(playerid, response, inputtext);case DialogBankWithdraw: Dialog_BankWithdraw(playerid, response, inputtext);case DialogBankTransferMoney: Dialog_BankTransferMoney(playerid, response, inputtext);case DialogBankTransferName: Dialog_BankTransferName(playerid, response, inputtext);case DialogBankCancel: Dialog_BankCancel(playerid, response);case DialogHelpItemChosen: Dialog_HelpItemChosen(playerid, response, listitem);case DialogHelpItem: Dialog_HelpItem(playerid, response);case DialogOldPassword: Dialog_OldPassword(playerid, response, inputtext);case DialogNewPassword: Dialog_NewPassword(playerid, response, inputtext);case DialogConfirmPassword: Dialog_ConfirmPassword(playerid, response);} return 1;}// this callback gets called when a player clicks on another player on the scoreboardpublic OnPlayerClickPlayer(playerid, clickedplayerid, source){// Check if the player is an admin of at least level 1if (APlayerData[playerid][PlayerLevel] >= 1){// Setup local variablesnew Name[24], DialogTitle[128], PlayerStatList[3000], PlayerIP[16], NumHouses, NumBusinesses;// Construct the dialog-titleGetPlayerName(clickedplayerid, Name, sizeof(Name));format(DialogTitle, 128, \"Statistics of player: %s\", Name);// Add the IP of the player to the list GetPlayerIp(clickedplayerid, PlayerIP, sizeof(PlayerIP));format(PlayerStatList, sizeof(PlayerStatList), \"%s{FFFFFF}Player-IP: {00FF00}%s\\n\", PlayerStatList, PlayerIP);// Add the level of the player to the listformat(PlayerStatList, sizeof(PlayerStatList), \"%s{FFFFFF}Admin-level: {00FF00}%i\\n\", PlayerStatList, APlayerData[clickedplayerid][PlayerLevel]);// Add the class of the player to the listswitch(APlayerData[clickedplayerid][PlayerClass]){ case ClassTruckDriver: format(PlayerStatList, sizeof(PlayerStatList), \"%s{FFFFFF}Class: {00FF00}Trucker\\n\", PlayerStatList); case ClassBusDriver: format(PlayerStatList, sizeof(PlayerStatList), \"%s{FFFFFF}Class: {00FF00}Bus driver\\n\", PlayerStatList); case ClassPilot: format(PlayerStatList, sizeof(PlayerStatList), \"%s{FFFFFF}Class: {00FF00}Pilot\\n\", PlayerStatList); case ClassPolice: format(PlayerStatList, sizeof(PlayerStatList), \"%s{FFFFFF}Class: {00FF00}Police\\n\", PlayerStatList); case ClassMafia: format(PlayerStatList, sizeof(PlayerStatList), \"%s{FFFFFF}Class: {00FF00}Mafia\\n\", PlayerStatList); case ClassCourier: format(PlayerStatList, sizeof(PlayerStatList), \"%s{FFFFFF}Class: {00FF00}Courier\\n\", PlayerStatList); case ClassAssistance: format(PlayerStatList, sizeof(PlayerStatList), \"%s{FFFFFF}Class: {00FF00}Assistance\\n\", PlayerStatList);}// Add money and score of the player to the listformat(PlayerStatList, sizeof(PlayerStatList), \"%s{FFFFFF}Money: {00FF00}%i\\n\", PlayerStatList, APlayerData[clickedplayerid][PlayerMoney]);format(PlayerStatList, sizeof(PlayerStatList), \"%s{FFFFFF}Score: {00FF00}%i\\n\", PlayerStatList, APlayerData[clickedplayerid][PlayerScore]);// Add wanted-level of the player to the listformat(PlayerStatList, sizeof(PlayerStatList), \"%s{FFFFFF}Wanted-level: {00FF00}%i\\n\", PlayerStatList, GetPlayerWantedLevel(clickedplayerid));// Add truckerlicense and busdriver license of the player to the listif (APlayerData[clickedplayerid][TruckerLicense] == 1) format(PlayerStatList, sizeof(PlayerStatList), \"%s{FFFFFF}Trucker License: {00FF00}Yes\\n\", PlayerStatList);else format(PlayerStatList, sizeof(PlayerStatList), \"%s{FFFFFF}Trucker License: {00FF00}No\\n\", PlayerStatList);if (APlayerData[clickedplayerid][busLicense] == 1) format(PlayerStatList, sizeof(PlayerStatList), \"%s{FFFFFF}Bus License: {00FF00}Yes\\n\", PlayerStatList);else format(PlayerStatList, sizeof(PlayerStatList), \"%s{FFFFFF}Bus License: {00FF00}No\\n\", PlayerStatList);format(PlayerStatList, sizeof(PlayerStatList), \"%s{FFFFFF}Completed trucker jobs: {00FF00}%i\\n\", PlayerStatList, APlayerData[clickedplayerid][statsTruckerJobs]);format(PlayerStatList, sizeof(PlayerStatList), \"%s{FFFFFF}Completed convoy jobs: {00FF00}%i\\n\", PlayerStatList, APlayerData[clickedplayerid][statsConvoyJobs]);format(PlayerStatList, sizeof(PlayerStatList), \"%s{FFFFFF}Completed busdriver jobs: {00FF00}%i\\n\", PlayerStatList, APlayerData[clickedplayerid][statsBusDriverJobs]);format(PlayerStatList, sizeof(PlayerStatList), \"%s{FFFFFF}Completed pilot jobs: {00FF00}%i\\n\", PlayerStatList, APlayerData[clickedplayerid][statsPilotJobs]);format(PlayerStatList, sizeof(PlayerStatList), \"%s{FFFFFF}Completed mafia jobs: {00FF00}%i\\n\", PlayerStatList, APlayerData[clickedplayerid][statsMafiaJobs]);format(PlayerStatList, sizeof(PlayerStatList), \"%s{FFFFFF}Stolen mafia-loads: {00FF00}%i\\n\", PlayerStatList, APlayerData[clickedplayerid][statsMafiaStolen]);format(PlayerStatList, sizeof(PlayerStatList), \"%s{FFFFFF}Fined players: {00FF00}%i\\n\", PlayerStatList, APlayerData[clickedplayerid][statsPoliceFined]);format(PlayerStatList, sizeof(PlayerStatList), \"%s{FFFFFF}Jailed players: {00FF00}%i\\n\", PlayerStatList, APlayerData[clickedplayerid][statsPoliceJailed]);format(PlayerStatList, sizeof(PlayerStatList), \"%s{FFFFFF}Completed courier jobs: {00FF00}%i\\n\", PlayerStatList, APlayerData[clickedplayerid][statsCourierJobs]);format(PlayerStatList, sizeof(PlayerStatList), \"%s{FFFFFF}Completed roadworker jobs: {00FF00}%i\\n\", PlayerStatList, APlayerData[clickedplayerid][statsRoadworkerJobs]);format(PlayerStatList, sizeof(PlayerStatList), \"%s{FFFFFF}Assisted players: {00FF00}%i\\n\", PlayerStatList, APlayerData[clickedplayerid][statsAssistance]);format(PlayerStatList, sizeof(PlayerStatList), \"%s{FFFFFF}Meters driven: {00FF00}%f\\n\", PlayerStatList, APlayerData[clickedplayerid][statsMetersDriven]);// Count the number of houses/businesses that the player has and add them to the listfor (new i; i < MAX_HOUSESPERPLAYER; i++) if (APlayerData[clickedplayerid][Houses] != 0) NumHouses++;for (new i; i < MAX_BUSINESSPERPLAYER; i++) if (APlayerData[clickedplayerid][business] != 0) NumBusinesses++;format(PlayerStatList, sizeof(PlayerStatList), \"%s{FFFFFF}Houses: {00FF00}%i (double-click for stats)\\n\", PlayerStatList, NumHouses);format(PlayerStatList, sizeof(PlayerStatList), \"%s{FFFFFF}Businesses: {00FF00}%i (double-click for stats)\\n\", PlayerStatList, NumBusinesses);// Store the player-id of the other player so the other dialogs can display his statistics further (houses, businesses, cars)APlayerData[playerid][DialogOtherPlayer] = clickedplayerid;// Show the statistics of the other playerShowPlayerDialog(playerid, DialogStatsOtherPlayer, DIALOG_STYLE_LIST, DialogTitle, PlayerStatList, TXT_DialogButtonSelect, TXT_DialogButtonCancel); // Let the player buy a license}return 1;} // This callback gets called when a player picks up any pickuppublic OnPlayerPickUpPickup(playerid, pickupid){// If the player picks up the Buy_License pickup at the driving school in Dohertyif (pickupid == Pickup_License) // Ask the player which license he wants to buyShowPlayerDialog(playerid, DialogBuyLicenses, DIALOG_STYLE_LIST, TXT_DialogLicenseTitle, TXT_DialogLicenseList, TXT_DialogButtonBuy, TXT_DialogButtonCancel); // Let the player buy a licensereturn 1;} // This callback gets called when a player spawns somewherepublic OnPlayerSpawn(playerid){// Always allow NPC\'s to spawn without logging inif (IsPlayerNPC(playerid))return 1;// Check if the player properly logged in by typing his passwordif (APlayerData[playerid][LoggedIn] == false){SendClientMessage(playerid, 0xFFFFFFFF, TXT_FailedLoginProperly); Kick(playerid); // Kick the player if he didn\'t log in properly}// Setup local variablesnew missiontext[200];// Spawn the player in the global world (where everybody plays the game) SetPlayerVirtualWorld(playerid, 0);SetPlayerInterior(playerid, 0);// Also set a variable that tracks in which house the player currently isAPlayerData[playerid][CurrentHouse] = 0;// Disable the clockTogglePlayerClock(playerid, 0);// Delete all weapons from the playerResetPlayerWeapons(playerid);// Set the missiontext based on the chosen classswitch (APlayerData[playerid][PlayerClass]){case ClassTruckDriver: // Truck-driver class{ format(missiontext, sizeof(missiontext), Trucker_NoJobText); // Preset the missiontext SetPlayerColor(playerid, ColorClassTruckDriver); // Set the playercolor (chatcolor for the player and color on the map)}case ClassBusDriver: // Bus-driver class{ format(missiontext, sizeof(missiontext), BusDriver_NoJobText); // Preset the missiontext SetPlayerColor(playerid, ColorClassBusDriver); // Set the playercolor (chatcolor for the player and color on the map)}case ClassPilot: // Pilot class{ format(missiontext, sizeof(missiontext), Pilot_NoJobText); // Preset the missiontext SetPlayerColor(playerid, ColorClassPilot); // Set the playercolor (chatcolor for the player and color on the map)}case ClassPolice: // Police class{ format(missiontext, sizeof(missiontext), Police_NoJobText); // Preset the missiontext SetPlayerColor(playerid, ColorClassPolice); // Set the playercolor (chatcolor for the player and color on the map) // Start the PlayerCheckTimer to scan for wanted players (be sure the timer has been destroyed first) KillTimer(APlayerData[playerid][PlayerCheckTimer]); APlayerData[playerid][PlayerCheckTimer] = SetTimerEx(\"Police_CheckWantedPlayers\", 1000, true, \"i\", playerid); // Check if the police player can get weapons if (PoliceGetsWeapons == true) { // Give up to 12 weapons to the player for (new i; i < 12; i++) GivePlayerWeapon(playerid, APoliceWeapons, PoliceWeaponsAmmo); }}case ClassMafia: // Mafia class{ format(missiontext, sizeof(missiontext), Mafia_NoJobText); // Preset the missiontext SetPlayerColor(playerid, ColorClassMafia); // Set the playercolor (chatcolor for the player and color on the map) // Start the PlayerCheckTimer to scan for players that carry mafia-loads (be sure the timer has been destroyed first) KillTimer(APlayerData[playerid][PlayerCheckTimer]); APlayerData[playerid][PlayerCheckTimer] = SetTimerEx(\"Mafia_CheckMafiaLoads\", 1000, true, \"i\", playerid);}case ClassCourier: // Courier class{ format(missiontext, sizeof(missiontext), Courier_NoJobText); // Preset the missiontext SetPlayerColor(playerid, ColorClassCourier); // Set the playercolor (chatcolor for the player and color on the map)}case ClassAssistance: // Assistance class{ format(missiontext, sizeof(missiontext), Assistance_NoJobText); // Preset the missiontext SetPlayerColor(playerid, ColorClassAssistance); // Set the playercolor (chatcolor for the player and color on the map) // Start the PlayerCheckTimer to scan for players who need assistance (be sure the timer has been destroyed first) KillTimer(APlayerData[playerid][PlayerCheckTimer]); APlayerData[playerid][PlayerCheckTimer] = SetTimerEx(\"Assistance_CheckPlayers\", 1000, true, \"i\", playerid);}case ClassRoadWorker: // Roadworker class{ format(missiontext, sizeof(missiontext), RoadWorker_NoJobText); // Preset the missiontext SetPlayerColor(playerid, ColorClassRoadWorker); // Set the playercolor (chatcolor for the player and color on the map)}}// Set the missiontextTextDrawSetString(APlayerData[playerid][MissionText], missiontext);// Show the missiontext for this playerTextDrawShowForPlayer(playerid, APlayerData[playerid][MissionText]);// If the player spawns and his jailtime hasn\'t passed yet, put him back in jailif (APlayerData[playerid][PlayerJailed] != 0) Police_JailPlayer(playerid, APlayerData[playerid][PlayerJailed]);return 1;} // This callback gets called whenever a player enters a checkpointpublic OnPlayerEnterCheckpoint(playerid){// Check the player\'s classswitch (APlayerData[playerid][PlayerClass]){case ClassTruckDriver: // Truckdriver class Trucker_OnPlayerEnterCheckpoint(playerid); // Process the checkpoint (load or unload goods)case ClassBusDriver: // BusDriver class{ GameTextForPlayer(playerid, TXT_BusDriverMissionPassed, 3000, 4); // Show a message to let the player know he finished his job BusDriver_EndJob(playerid); // End the current mission}case ClassPilot: // Pilot class Pilot_OnPlayerEnterCheckpoint(playerid); // Process the checkpoint (load or unload)case ClassMafia: // Mafia class Mafia_OnPlayerEnterCheckpoint(playerid);case ClassCourier: // Courier class Courier_OnPlayerEnterCheckpoint(playerid);case ClassRoadWorker: // Roadworker class{ // Only end the mission when doing \"repair-speedcamera\" jobtype (checkpoint is the base of the roadworker) if (APlayerData[playerid][JobID] == 1) // Repairing speedcamera\'s { GameTextForPlayer(playerid, TXT_RoadworkerMissionPassed, 3000, 4); // Show a message to let the player know he finished his job Roadworker_EndJob(playerid); // End the current mission } if (APlayerData[playerid][JobID] == 2) // Towing broken vehicle to shredder Roadworker_EnterCheckpoint(playerid);}}return 1;} // This callback gets called when a player enters a race-checkpointpublic OnPlayerEnterRaceCheckpoint(playerid){// Check the player\'s classswitch (APlayerData[playerid][PlayerClass]){case ClassBusDriver: // BusDriver class Bus_EnterRaceCheckpoint(playerid); // Process the checkpointcase ClassRoadWorker: // Roadworker class Roadworker_EnterRaceCheckpoint(playerid);}return 1;} // This callback gets called whenever a player diespublic OnPlayerDeath(playerid, killerid, reason){// Setup local variablesnew VictimName[24], KillerName[24], Msg[128];// Clear the missiontextTextDrawSetString(APlayerData[playerid][MissionText], \" \");// Hide the missiontext for this player (when the player is choosing a class, it\'s not required to show any mission-text)TextDrawHideForPlayer(playerid, APlayerData[playerid][MissionText]);// Stop any job that may have startedswitch (APlayerData[playerid][PlayerClass]){case ClassTruckDriver: Trucker_EndJob(playerid);case ClassBusDriver: BusDriver_EndJob(playerid);case ClassPilot: Pilot_EndJob(playerid);case ClassPolice: Police_EndJob(playerid);case ClassMafia: Mafia_EndJob(playerid);case ClassAssistance: Assistance_EndJob(playerid);case ClassRoadWorker: Roadworker_EndJob(playerid);}// If the player is part of a convoy, kick him from itConvoy_Leave(playerid);// If another player kills you, he\'ll get an extra star of his wanted levelif (killerid != INVALID_PLAYER_ID){// Increase the wanted level of the killer by one star SetPlayerWantedLevel(killerid, GetPlayerWantedLevel(killerid) + 1); // Get the name of the killed player and the killer GetPlayerName(playerid, VictimName, sizeof(VictimName)); GetPlayerName(killerid, KillerName, sizeof(KillerName)); // Let the killed know the police are informed about the killformat(Msg, 128, \"{FF0000}Megölted {FFFF00}%s{FF0000}, köröznek a rendörök\", VictimName);SendClientMessage(killerid, 0xFFFFFFFF, Msg);// Inform all police players about the killformat(Msg, 128, \"{00FF00}Player {FFFF00}%s{00FF00} killed {FFFF00}%s{00FF00}, pursue and fine him\", KillerName, VictimName);Police_SendMessage(Msg);}return 1;} // This callback gets called when the player is selecting a class (but hasn\'t clicked \"Spawn\" yet)public OnPlayerRequestClass(playerid, classid){SetPlayerInterior(playerid,14);SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);SetPlayerFacingAngle(playerid, 270.0);SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);// Display a short message to inform the player about the class he\'s about to chooseswitch (classid){ case 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12: // Classes that will be truckdrivers{ // Display the name of the class GameTextForPlayer(playerid, TXT_ClassTrucker, 3000, 4); // Store the class for the player (truckdriver) APlayerData[playerid][PlayerClass] = ClassTruckDriver;}case 13, 14: // Classes that will be bus-drivers{ // Display the name of the class GameTextForPlayer(playerid, TXT_ClassBusDriver, 3000, 4); // Store the class for the player (busdriver) APlayerData[playerid][PlayerClass] = ClassBusDriver;}case 15: // Classes that will be Pilot{ // Display the name of the class GameTextForPlayer(playerid, TXT_ClassPilot, 3000, 4); // Store the class for the player (pilot) APlayerData[playerid][PlayerClass] = ClassPilot;}case 16, 17, 18, 19, 20, 21, 22, 23, 24 : // Classes that will be police{ // Display the name of the class GameTextForPlayer(playerid, TXT_ClassPolice, 3000, 4); // Store the class for the player (police) APlayerData[playerid][PlayerClass] = ClassPolice;}case 25, 26, 27, 28, 29, 30, 31, 32, 33, 34: // Classes that will be mafia{ // Display the name of the class GameTextForPlayer(playerid, TXT_ClassMafia, 3000, 4); // Store the class for the player (mafia) APlayerData[playerid][PlayerClass] = ClassMafia;}case 35, 36: // Classes that will be courier{ // Display the name of the class GameTextForPlayer(playerid, TXT_ClassCourier, 3000, 4); // Store the class for the player (courier) APlayerData[playerid][PlayerClass] = ClassCourier;}case 37, 38: // Classes that will be assistance{ // Display the name of the class GameTextForPlayer(playerid, TXT_ClassAssistance, 3000, 4); // Store the class for the player (assistance) APlayerData[playerid][PlayerClass] = ClassAssistance;}case 39, 40, 41: // Classes that will be roadworker{ // Display the name of the class GameTextForPlayer(playerid, TXT_ClassRoadWorker, 3000, 4); // Store the class for the player (roadworker) APlayerData[playerid][PlayerClass] = ClassRoadWorker;}}return 1;} // This callback is called when the player attempts to spawn via class-selectionpublic OnPlayerRequestSpawn(playerid){new Index, Float:x, Float:y, Float:z, Float:Angle, Name[24], Msg[128];// Get the player\'s nameGetPlayerName(playerid, Name, sizeof(Name));// Choose a random spawnlocation based on the player\'s classswitch (APlayerData[playerid][PlayerClass]){case ClassTruckDriver:{ Index = random(sizeof(ASpawnLocationsTrucker)); // Get a random array-index to chose a random spawnlocation x = ASpawnLocationsTrucker[index][spawnX]; // Get the X-position for the spawnlocation y = ASpawnLocationsTrucker[index][spawnY]; // Get the Y-position for the spawnlocation z = ASpawnLocationsTrucker[index][spawnZ]; // Get the Z-position for the spawnlocation Angle = ASpawnLocationsTrucker[index][spawnAngle]; // Get the rotation-angle for the spawnlocation format(Msg, 128, \"{FFFF00}%s{00FF00} Csatlakozott {FFFF00}Kamionosnak\", Name);}case ClassBusDriver:{ Index = random(sizeof(ASpawnLocationsBusDriver)); x = ASpawnLocationsBusDriver[index][spawnX]; // Get the X-position for the spawnlocation y = ASpawnLocationsBusDriver[index][spawnY]; // Get the Y-position for the spawnlocation z = ASpawnLocationsBusDriver[index][spawnZ]; // Get the Z-position for the spawnlocation Angle = ASpawnLocationsBusDriver[index][spawnAngle]; // Get the rotation-angle for the spawnlocation format(Msg, 128, \"{FFFF00}%s{00FF00} Csatlakozott {FFFF00}Buszosnak\", Name);}case ClassPilot:{ Index = random(sizeof(ASpawnLocationsPilot)); x = ASpawnLocationsPilot[index][spawnX]; // Get the X-position for the spawnlocation y = ASpawnLocationsPilot[index][spawnY]; // Get the Y-position for the spawnlocation z = ASpawnLocationsPilot[index][spawnZ]; // Get the Z-position for the spawnlocation Angle = ASpawnLocationsPilot[index][spawnAngle]; // Get the rotation-angle for the spawnlocation format(Msg, 128, \"{FFFF00}%s{00FF00} Csatlakozott {FFFF00}Pilótának\", Name);}case ClassPolice:{ // If the player has less than 100 scorepoints if (APlayerData[playerid][PlayerScore] < 100) { // Let the player know he needs 100 scorepoints GameTextForPlayer(playerid, \"100 pont kel hogy rendör lehes\", 5000, 4); SendClientMessage(playerid, 0xFFFFFFFF, \"{FF0000}100 pont kel hogy rendör lehes\"); return 0; // Don\'t allow the player to spawn as police player } // If the player has a wanted level if (GetPlayerWantedLevel(playerid) > 0) { // Let the player know he cannot have a wanted level to join police GameTextForPlayer(playerid, \"Nem lehetsz rendör mert körözöt vagy\", 5000, 4); SendClientMessage(playerid, 0xFFFFFFFF, \"{FF0000}Nem lehetsz rendör mert körözöt vagy\"); return 0; // Don\'t allow the player to spawn as police player } Index = random(sizeof(ASpawnLocationsPolice)); x = ASpawnLocationsPolice[index][spawnX]; // Get the X-position for the spawnlocation y = ASpawnLocationsPolice[index][spawnY]; // Get the Y-position for the spawnlocation z = ASpawnLocationsPolice[index][spawnZ]; // Get the Z-position for the spawnlocation Angle = ASpawnLocationsPolice[index][spawnAngle]; // Get the rotation-angle for the spawnlocation format(Msg, 128, \"{FFFF00}%s{00FF00} Csatlakozott {FFFF00}Rendőrnek\", Name);}case ClassMafia:{ Index = random(sizeof(ASpawnLocationsMafia)); x = ASpawnLocationsMafia[index][spawnX]; // Get the X-position for the spawnlocation y = ASpawnLocationsMafia[index][spawnY]; // Get the Y-position for the spawnlocation z = ASpawnLocationsMafia[index][spawnZ]; // Get the Z-position for the spawnlocation Angle = ASpawnLocationsMafia[index][spawnAngle]; // Get the rotation-angle for the spawnlocation format(Msg, 128, \"{FFFF00}%s{00FF00} Csatlakozott {FFFF00}Mafiának\", Name);}case ClassCourier:{ Index = random(sizeof(ASpawnLocationsCourier)); x = ASpawnLocationsCourier[index][spawnX]; // Get the X-position for the spawnlocation y = ASpawnLocationsCourier[index][spawnY]; // Get the Y-position for the spawnlocation z = ASpawnLocationsCourier[index][spawnZ]; // Get the Z-position for the spawnlocation Angle = ASpawnLocationsCourier[index][spawnAngle]; // Get the rotation-angle for the spawnlocation format(Msg, 128, \"{FFFF00}%s{00FF00} Csatlakozott {FFFF00}Futárnak\", Name);}case ClassAssistance:{ Index = random(sizeof(ASpawnLocationsAssistance)); x = ASpawnLocationsAssistance[index][spawnX]; // Get the X-position for the spawnlocation y = ASpawnLocationsAssistance[index][spawnY]; // Get the Y-position for the spawnlocation z = ASpawnLocationsAssistance[index][spawnZ]; // Get the Z-position for the spawnlocation Angle = ASpawnLocationsAssistance[index][spawnAngle]; // Get the rotation-angle for the spawnlocation format(Msg, 128, \"{FFFF00}%s{00FF00} Csatlakozott {FFFF00}Autómentőnek\", Name);}case ClassRoadWorker:{ Index = random(sizeof(ASpawnLocationsRoadWorker)); x = ASpawnLocationsRoadWorker[index][spawnX]; // Get the X-position for the spawnlocation y = ASpawnLocationsRoadWorker[index][spawnY]; // Get the Y-position for the spawnlocation z = ASpawnLocationsRoadWorker[index][spawnZ]; // Get the Z-position for the spawnlocation Angle = ASpawnLocationsRoadWorker[index][spawnAngle]; // Get the rotation-angle for the spawnlocation format(Msg, 128, \"{FFFF00}%s{00FF00} Csatlakozott {FFFF00}Útkaprbantartónak\", Name);}}// Spawn the player with his chosen skin at a random location based on his classSetSpawnInfo(playerid, 0, GetPlayerSkin(playerid), x, y, z, Angle, 0, 0, 0, 0, 0, 0);// Send the message to all players (who joined which class)SendClientMessageToAll(0xFFFFFFFF, Msg); return 1;} // This callback gets called when a vehicle respawns at it\'s spawn-location (where it was created)public OnVehicleSpawn(vehicleid){// Set the vehicle as not-wanted by the mafiaAVehicleData[vehicleid][MafiaLoad] = false;// Also reset the fuel to maximum (only for non-owned vehicles)if (AVehicleData[vehicleid][Owned] == false)AVehicleData[vehicleid][Fuel] = MaxFuel;// Re-apply the paintjob (if any was applied)if (AVehicleData[vehicleid][PaintJob] != 0){ // Re-apply the paintjobChangeVehiclePaintjob(vehicleid, AVehicleData[vehicleid][PaintJob] - 1);}// Also update the car-colorChangeVehicleColor(vehicleid, AVehicleData[vehicleid][Color1], AVehicleData[vehicleid][Color2]);// Re-add all components that were installed (if they were there)for (new i; i < 14; i++){// Remove all mods from the vehicle (all added mods applied by hackers will hopefully be removed this way when the vehicle respawns) RemoveVehicleComponent(vehicleid, GetVehicleComponentInSlot(vehicleid, i)); // Check if the componentslot has a valid component-idif (AVehicleData[vehicleid][Components] != 0) AddVehicleComponent(vehicleid, AVehicleData[vehicleid][Components]); // Add the component to the vehicle} return 1;} // This callback is called when the vehicle leaves a mod shoppublic OnVehicleRespray(playerid, vehicleid, color1, color2){// Let the player pay $150 for changing the color (if they have been changed)if ((AVehicleData[vehicleid][Color1] != color1) || (AVehicleData[vehicleid][Color2] != color2)){RewardPlayer(playerid, -100, 0);SendClientMessage(playerid, 0xFFFFFFFF, \"{00FF00}Kicserélted az autód szinét $100\");}// Save the colorsAVehicleData[vehicleid][Color1] = color1;AVehicleData[vehicleid][Color2] = color2;// If the primary color is black, remove the paintjobif (color1 == 0)AVehicleData[vehicleid][PaintJob] = 0;return 1;} // This callback gets called when a player enters or exits a mod-shoppublic OnEnterExitModShop(playerid, enterexit, interiorid){return 1;} // This callback gets called whenever a player mods his vehiclepublic OnVehicleMod(playerid, vehicleid, componentid){// When the player changes a component of his vehicle, reduce the price of the component from the player\'s moneyAPlayerData[playerid][PlayerMoney] = APlayerData[playerid][PlayerMoney] - AVehicleModPrices[componentid - 1000];// Store the component in the AVehicleData arrayAVehicleData[vehicleid][Components][GetVehicleComponentType(componentid)] = componentid;return 1;} // This callback gets called whenever a player VIEWS at a paintjob in a mod garage (viewing automatically applies it)public OnVehiclePaintjob(playerid, vehicleid, paintjobid){// Store the paintjobid for the vehicle (add 1 to the value, otherwise checking for an applied paintjob is difficult) AVehicleData[vehicleid][PaintJob] = paintjobid + 1;return 1;} // This callback gets called whenever a player enters a vehiclepublic OnPlayerEnterVehicle(playerid, vehicleid, ispassenger){// Setup local variablesnew engine, lights, alarm, doors, bonnet, boot, objective;// Check if the vehicle has fuelif (AVehicleData[vehicleid][Fuel] > 0){// Start the engine and turn on the lightsGetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);SetVehicleParamsEx(vehicleid, 1, 1, alarm, doors, bonnet, boot, objective);}// Store the player\'s current location and interior-id, otherwise anti-airbreak hack code could kick youGetPlayerPos(playerid, APlayerData[playerid][PreviousX], APlayerData[playerid][PreviousY], APlayerData[playerid][PreviousZ]);APlayerData[playerid][PreviousInt] = GetPlayerInterior(playerid);return 1;} // This callback gets called when a player exits his vehiclepublic OnPlayerExitVehicle(playerid, vehicleid){// Setup local variablesnew engine, lights, alarm, doors, bonnet, boot, objective;// Check if the player is the driver of the vehicleif (GetPlayerVehicleSeat(playerid) == 0){// Turn off the lights and engineGetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);SetVehicleParamsEx(vehicleid, 0, 0, alarm, doors, bonnet, boot, objective);}// Chech if the player is a pilotif (APlayerData[playerid][PlayerClass] == ClassPilot){ // If the pilot started a job --> as soon as a pilot leaves his plane while doing a job, he fails his missionif (APlayerData[playerid][JobStarted] == true){ // End the job (clear data) Pilot_EndJob(playerid); // Inform the player that he failed the mission GameTextForPlayer(playerid, TXT_FailedMission, 5000, 4); // Reduce the player\'s cash by 1000 RewardPlayer(playerid, -1000, 0);}}return 1;} // This callback gets called whenever a vehicle enters the water or is destroyed (explodes)public OnVehicleDeath(vehicleid){// Get the houseid to which this vehicle belongsnew HouseID = AVehicleData[vehicleid][belongsToHouse];// Check if this vehicle belongs to a houseif (HouseID != 0){// If the house doesn\'t have insurance for it\'s vehiclesif (AHouseData[HouseID][insurance] == 0){ // Delete the vehicle, clear the data and remove it from the house it belongs to Vehicle_Delete(vehicleid); // Save the house (and linked vehicles) HouseFile_Save(HouseID);}}return 1;} // This callback gets called when the player changes statepublic OnPlayerStateChange(playerid,newstate,oldstate){// Setup local variablesnew vid, Name[24], Msg[128], engine, lights, alarm, doors, bonnet, boot, objective;switch (newstate){case PLAYER_STATE_DRIVER: // Player became the driver of a vehicle{ // Get the ID of the player\'s vehicle vid = GetPlayerVehicleID(playerid); // Get the player\'s name (the one who is trying to enter the vehicle) GetPlayerName(playerid, Name, sizeof(Name)); // Check if the vehicle is owned if (AVehicleData[vid][Owned] == true) { // Check if the vehicle is owned by somebody else (strcmp will not be 0) if (strcmp(AVehicleData[vid][Owner], Name, false) != 0) { // Force the player out of the vehicle RemovePlayerFromVehicle(playerid); // Turn off the lights and engine GetVehicleParamsEx(vid, engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(vid, 0, 0, alarm, doors, bonnet, boot, objective); // Let the player know he cannot use somebody else\'s vehicle format(Msg, 128, TXT_SpeedometerCannotUseVehicle, AVehicleData[vid][Owner]); SendClientMessage(playerid, 0xFFFFFFFF, Msg); } // Check if the vehicle is clamped if (AVehicleData[vid][Clamped] == true) { // Force the player out of the vehicle RemovePlayerFromVehicle(playerid); // Turn off the lights and engine GetVehicleParamsEx(vid, engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(vid, 0, 0, alarm, doors, bonnet, boot, objective); // Let the player know he cannot use a clamped vehicle format(Msg, 128, TXT_SpeedometerClampedVehicle); SendClientMessage(playerid, 0xFFFFFFFF, Msg); format(Msg, 128, TXT_SpeedometerClampedVehicle2); SendClientMessage(playerid, 0xFFFFFFFF, Msg); } } // Check if the player is not a cop if (APlayerData[playerid][PlayerClass] != ClassPolice) { // First check if the vehicle is a static vehicle (player can still use a bought cop-car that he bought in his house, // as a bought vehicle isn\'t static) if (AVehicleData[vid][staticVehicle] == true) { // Check if the entered vehicle is a cop vehicle switch (GetVehicleModel(vid)) { case VehiclePoliceLSPD, VehiclePoliceSFPD, VehiclePoliceLVPD, VehicleHPV1000, VehiclePoliceRanger: { // Force the player out of the vehicle RemovePlayerFromVehicle(playerid); // Turn off the lights and engine GetVehicleParamsEx(vid, engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(vid, 0, 0, alarm, doors, bonnet, boot, objective); // Let the player know he cannot use a cop car SendClientMessage(playerid, 0xFFFFFFFF, \"{FF0000}Nem használhatod az autot mert a rendöröké\"); } } } }}}return 1;} // This callback gets called whenever a player presses a keypublic OnPlayerKeyStateChange(playerid, newkeys, oldkeys){// Debug the keypresses// DebugKeys(playerid, newkeys, oldkeys);// ****************************************************************************************// NOTE: the keys are messed up, so the code may look strange when testing for certain keys// ****************************************************************************************// Fining and jailing players when you\'re police and press the correct keys// Check the class of the playerswitch (APlayerData[playerid][PlayerClass]){case ClassPolice:{ // If the police-player pressed the RMB key (AIM key) when OUTSIDE his vehicle if (((newkeys & KEY_HANDBRAKE) && !(oldkeys & KEY_HANDBRAKE)) && (GetPlayerVehicleID(playerid) == 0)) Police_FineNearbyPlayers(playerid); // If the police-player pressed the LCTRL (SECUNDAIRY key) key when INSIDE his vehicle if (((newkeys & KEY_ACTION) && !(oldkeys & KEY_ACTION)) && (GetPlayerVehicleID(playerid) != 0)) Police_WarnNearbyPlayers(playerid);}case ClassAssistance:{ // If the assistance-player pressed the RMB key (AIM key) when OUTSIDE his vehicle if (((newkeys & KEY_HANDBRAKE) && !(oldkeys & KEY_HANDBRAKE)) && (GetPlayerVehicleID(playerid) == 0)) Assistance_FixVehicle(playerid); // If the police-player pressed the LCTRL (SECUNDAIRY key) key when INSIDE his vehicle if (((newkeys & KEY_ACTION) && !(oldkeys & KEY_ACTION)) && (GetPlayerVehicleID(playerid) != 0)) Assistance_FixOwnVehicle(playerid);}}// Trying to attach the closest vehicle to the towtruck when the player pressed FIRE when inside a towtruck// Check if the player is inside a towtruckif(GetVehicleModel(GetPlayerVehicleID(playerid)) == VehicleTowTruck){// Check if the player pushed the fire-keyif(newkeys & KEY_FIRE){ // Get the vehicle-id of the closest vehicle new closest = GetClosestVehicle(playerid); if(VehicleToPlayer(playerid, closest) < 10) // Check if the closest vehicle is within 10m from the player AttachTrailerToVehicle(closest, GetPlayerVehicleID(playerid)); // Attach the vehicle to the towtruck}}// Refuel a vehicle when driving a vehicle and pressing the HORN key// Check if the player presses the HORN keyif ((newkeys & KEY_CROUCH) && !(oldkeys & KEY_CROUCH)){// Check if the player is driving a vehicleif (GetPlayerVehicleSeat(playerid) == 0){ // Loop through all ARefuelPickups for (new i; i < sizeof(ARefuelPickups); i++) { // Check if the player is in range of a refuelpickup if(IsPlayerInRangeOfPoint(playerid, 2.5, ARefuelPickups[pux], ARefuelPickups[puy], ARefuelPickups[puz])) { // Show a message that the player\'s vehicle is refuelling GameTextForPlayer(playerid, TXT_Refuelling, 3000, 4); // Don\'t allow the player to move again (the timer will allow it after refuelling) TogglePlayerControllable(playerid, 0); // Start a timer (let the player wait until the vehicle is refuelled) SetTimerEx(\"Tankolás Várj...\", 5000, false, \"i\", playerid); // Stop the search break; } }}}return 1;} forward VehicleToPlayer(playerid,vehicleid);// Get the distance between the vehicle and the playerpublic VehicleToPlayer(playerid, vehicleid){// Setup local variablesnew Float:pX, Float:pY, Float:pZ, Float:cX, Float:cY, Float:cZ, Float:distance;// Get the player positionGetPlayerPos(playerid, pX, pY, pZ);// Get the vehicle positionGetVehiclePos(vehicleid, cX, cY, cZ);// Calculate the distancedistance = floatsqroot(floatpower(floatabs(floatsub(cX, pX)), 2) + floatpower(floatabs(floatsub(cY, pY)), 2) + floatpower(floatabs(floatsub(cZ, pZ)), 2));// Return the distance to the calling routinereturn floatround(distance);} forward GetClosestVehicle(playerid);// Find the vehicle closest to the playerpublic GetClosestVehicle(playerid){// Setup local variablesnew Float:distance = 99999.000+1, Float:distance2, result = -1;// Loop through all vehiclesfor(new i = 0; i < MAX_VEHICLES; i++){// First check if the player isn\'t driving the current vehicle that needs to be checked for it\'s distance to the playerif (GetPlayerVehicleID(playerid) != i){ // Get
SendAdminText(playerid, command[], text[])
case 10: SetSpawnInfo(playerid, 0, GetPlayerSkin(playerid), 2612.5574,10.8203,182.0162,0,0,0,0,0,0);
format(OptionsList, sizeof(OptionsList), \"%sHáz nevének megváltoztatása\\n\", OptionsList);ShowPlayerDialog(playerid, DialogRescue, DIALOG_STYLE_LIST, \"Choose trucker spawn point:\", \"Fallen Tree Depó\\r\\nFlint Trucking Depó\\r\\nLVA Freight Depó\\r\\nDoherty Depó\\r\\nEl Corona Depó\\r\\nLas Payasdas Depó\\r\\nBánya\\r\\nShady Creek Depó\\r\\nLV szigeti depó\\r\\nLs dokkoki depó\\r\\Kacc depó\", \"Spawn\", \"Cancel\");
// This function sends the given text to all adminsSendAdminText(playerid, command[], text[]){// Setup local variablesnew Name[24], Msg[128];// Loop through all playersfor (new i; i < MAX_PLAYERS; i++){// Check if the player is an adminif (APlayerData[PlayerLevel] > 0){ // Get the player\'s name GetPlayerName(playerid, Name, sizeof(Name)); // Send the given text to the admin format(Msg, 128, \"{00FFCC}%s Használta: %s %s\", Name, command, text); SendClientMessage(i, 0xFFFFFFFF, Msg);}}// Also log all used commands in the server.log fileformat(Msg, 128, \"%s Használta: %s %s\", Name, command, text);print(Msg);}
case 10: SetSpawnInfo(playerid, 0, GetPlayerSkin(playerid), 2612.5574,10.8203,182.0162,0, 0, 0, 0, 0, 0, 0);
ShowPlayerDialog(playerid, DialogRescue, DIALOG_STYLE_LIST, \"Choose trucker spawn point:\", \"Fallen Tree Depó\\r\\nFlint Trucking Depó\\r\\nLVA Freight Depó\\r\\nDoherty Depó\\r\\nEl Corona Depó\\r\\nLas Payasdas Depó\\r\\nBánya\\r\\nShady Creek Depó\\r\\nLV szigeti depó\\r\\nLs dokkoki depó\\r\\nKacc depó\", \"Spawn\", \"Cancel\");
format(DialogTitle, sizeof(DialogTitle), \"Select option for %s\", AHouseData[APlayerData[playerid][CurrentHouse]][HouseName]);
if(0 < kocsi < MAX_VEHICLES) return 0;[/ code]Itt egy link ahonnan másoltam ezt a funkciót: http://sampforum.hu/index.php?topic=24127.0
error 047 array sizes do not match or destination array is too small
if(params > 0){new params_szamlalo = 1;while(params_szamlalo <= params && params_szamlalo < sizeof(param)){ param[params_szamlalo] = GetParam(cmdtext, params_szamlalo); //Ez a hibás sor! params_szamlalo++;}}
CMD:fixveh(playerid){ if(IsPlayerConnected(playerid)){ if(PlayerInfo[playerid][Admin] >= 1) { if(IsPlayerInAnyVehicle(playerid)) { RepairVehicle(GetPlayerVehicleID(playerid)); SetVehicleHealth(GetPlayerVehicleID(playerid), 1000.0); SendClientMessage(playerid,GREEN,\"(( Jármű megjavítva! ))\"); GetPlayerName(playerid,nev,sizeof(nev)) new vehicle = GetPlayerVehicleID(playerid); printf(\"*AdmCmd* %s megjavított egy járművet. Jármű ID: %d\",nev,vehicle); } else SendClientMessage(playerid,ORANGE,\"(( Csak járműben használhatod! ))\");}else SendClientMessage(playerid,WHITE,\"Ismeretlen parancs!\");}return 1;}[/pawn]
Sziasztok! Ezt az errort kapom: 332 : error 001: expected token: \";\", but found \"new\" CMD:fixveh(playerid){ if(IsPlayerConnected(playerid)){ if(PlayerInfo[playerid][Admin] >= 1) { if(IsPlayerInAnyVehicle(playerid)) { RepairVehicle(GetPlayerVehicleID(playerid)); SetVehicleHealth(GetPlayerVehicleID(playerid), 1000.0); SendClientMessage(playerid,GREEN,\"(( Jármű megjavítva! ))\"); GetPlayerName(playerid,nev,sizeof(nev)) new vehicle = GetPlayerVehicleID(playerid); printf(\"*AdmCmd* %s megjavított egy járművet. Jármű ID: %d\",nev,vehicle); } else SendClientMessage(playerid,ORANGE,\"(( Csak járműben használhatod! ))\");}else SendClientMessage(playerid,WHITE,\"Ismeretlen parancs!\");}return 1;}[/code]
CMD:fixveh(playerid){ if(IsPlayerConnected(playerid)){ if(PlayerInfo[playerid][Admin] >= 1) { if(IsPlayerInAnyVehicle(playerid)) { RepairVehicle(GetPlayerVehicleID(playerid)); SetVehicleHealth(GetPlayerVehicleID(playerid), 1000.0); SendClientMessage(playerid,GREEN,\"(( Jármű megjavítva! ))\"); GetPlayerName(playerid,nev,sizeof(nev)) new vehicle = GetPlayerVehicleID(playerid); printf(\"*AdmCmd* %s megjavított egy járművet. Jármű ID: %d\",nev,vehicle); } else SendClientMessage(playerid,ORANGE,\"(( Csak járműben használhatod! ))\");}else SendClientMessage(playerid,WHITE,\"Ismeretlen parancs!\");}return 1;}
SA-MP 0.3.7-RC6-1Exception At Address: 0x00544BBEBase: 0x03B70000Registers:EAX: 0x0A267408 EBX: 0x00B99D08 ECX: 0x0A2673FC EDX: 0x00001801ESI: 0x00000198 EDI: 0x0B2E10D8 EBP: 0x00B99D10 ESP: 0x0028FA20EFLAGS: 0x00210206Stack:+0000: 0x45C9F2C3 0x0B2E10D8 0x03D5DC08 0x0B2E10D8+0010: 0x000000BC 0x000000BF 0x0000001D 0x000000D0+0020: 0x000000BC 0x00000020 0x00000198 0x45C8B7EA+0030: 0xC4AB9353 0x45CD219C 0xC4BD3A17 0x0028FAC0+0040: 0x0083C9CB 0x00000000 0x00563257 0x04299E70+0050: 0x0046987D 0x0B2E10D8 0x0028FA98 0x0B2E10D8+0060: 0x00000001 0x00000107 0x0028FB20 0x00000000+0070: 0xC4B466B5 0x45C9F2C3 0x45C9F2C3 0xC4B466B5+0080: 0x428C0000 0x0028FB30 0x774A34A1 0x00001199+0090: 0x00000000 0x00000146 0x00001199 0x774A34D8+00A0: 0x0028FB10 0x00837DD9 0xFFFFFFFF 0x00469EF7+00B0: 0x428C0000 0x0028FB44 0x03C1B03E 0x03C1B1F4+00C0: 0x03D5DC08 0x00004C56 0x00000000 0x00000146+00D0: 0x00001199 0x0028FB6C 0x42480000 0x00000000+00E0: 0x03C4A70F 0x00000001 0x0028FAE0 0x0028F560+00F0: 0x0028FB64 0x03C257E4 0x03C4ACF8 0x00000000+0100: 0x0E61F380 0x03C1302D 0x03C4A708 0x00004C56+0110: 0x60000000 0x40B93E58 0xA0000000 0xC0968CD6+0120: 0x00000000 0x40490000 0x0028FB5C 0x00000146+0130: 0x0E489FC8 0x76FECBAC 0x00000000 0x00000000+0140: 0x0E61F380 0x0028FB9C 0x03C41FB8 0x00000000+0150: 0x03C0AE2D 0x00004C56 0x45C9F2C3 0xC4B466B5+0160: 0x42480000 0x00000000 0x00000000 0x00000000+0170: 0x4415C000 0x00000000 0x0E61F380 0x0028FD3C+0180: 0x03C41F7B 0x00000000 0x03B7EF36 0x00004C56+0190: 0x45C9F2C3 0xC4B466B5 0x42480000 0x00000000+01A0: 0x00000000 0x00000000 0x4415C000 0x03D89B70+01B0: 0x00004C56 0x03C0908D 0x00000146 0x00004C56+01C0: 0x45C9F2C3 0xC4B466B5 0x42480000 0x00000000+01D0: 0x00000000 0x00000000 0x4415C000 0x03C739E0+01E0: 0x00000000 0x00000000 0x00000000 0x45C9F2C3+01F0: 0xC4B466B5 0x42480000 0x03C0951F 0x0028FC38+0200: 0x0028FC38 0x000000AB 0x03C739E0 0x0000001A+0210: 0x04290918 0x0E489FC8 0x34353931 0x36200032+0220: 0x2E323634 0x32353433 0x2D200031 0x33343431+0230: 0x3930322E 0x20003935 0x302E3035 0x30303030+0240: 0x20202000 0x30302E30 0x00303030 0x302E3020+0250: 0x30303030 0x2E302000 0x30303030 0x30003030+0260: 0x30202C30 0x3030302E 0x3B293030 0x000A000A+0270: 0x00C97B01 0x006A0026 0x3A14FDC9 0x9DA87429SCM Op: 0x107, lDbg: 1 LastRendObj: 0Game Version: US 1.0 [/quote]