Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //============================================================================//
- // ******* Brasil Drift Life [DRT v1.0a]******* //
- // By Lucas_Locate //
- // * Apoio ESTAC SA:MP * //
- //============================================================================//
- //=======================| Incluide's |=======================================//
- #include <a_samp>
- #include <a_players>
- #include <dini>
- #include <dudb>
- #include <zcmd>
- #include <colors>
- #include <F_streamer>
- #pragma tabsize 0
- #pragma unused ret_memcpy
- #pragma unused strtok
- //==============================| Defines |===================================//
- #define MAX_STRING 255
- #define player_x -250.9738
- #define player_y 2585.6497
- #define player_z 63.5703
- #define player_angle 210.3500
- #define camera_x -248.9410
- #define camera_y 2581.5327
- #define camera_z 64.9334
- #define moving_speed 50
- #define SERVER_USER_FILE "%s.ini"
- #define V_ID GetPlayerVehicleID(playerid)
- #define ResetMoneyBar ResetPlayerMoney
- #define UpdateMoneyBar GivePlayerMoney
- #define Fusion_Lucas 9122 // DIALOG
- #define Dialog_Fusion 9123 // DIALOG
- #define Dialog 4670 // DIALOG
- #define Reparar KEY_SUBMISSION
- #define senha aspect3571598426
- #define Adms "Admins/%s.ini"
- //=====================| Cores: 0xFFFFFFFF + {000000} |=======================//
- #define WHITE 0xFFFFFFAA {1BDE4F}
- #define VERDE 0x33AA33AA {33AA33}
- #define PRETO 0x000000FF {000000}
- #define AZUL 0x2641FEAA {2641FE}
- #define BLUE 0x004CFFAA {2D2DC2}
- #define DBLUE 0x0800A8AA {8FADF2}
- #define ROSA 0xFF48FFAA {B51DAB}
- #define ROSA1 0xDF00E0AA {D60FC9}
- #define GREY 0xC190FFAA {A8A2A2}
- #define AMARELO 0xE8D000AA {EDF72F}
- #define AMARELO1 0xD09C00AA {DBE61C}
- #define LARANJA 0xF08400AA {E67802}
- #define LARANJA1 0xFF2600AA {FFB05C}
- #define ATENÇÃO 0xFF3620AA {1AEDE3}
- #define VERMELHO 0xE00000AA {F20A0A}
- #define VERMELHO1 0x980000AA {FC2D2D}
- #define cyan 0x99FFFFAA
- //==========================| TEXTO |=====================================//
- new Text:Textdraw99;
- new Text:Textdraw88;
- new Text:Textdraw9;
- new Text:fusion;
- //============================================================================//
- //==========================| Forward _____ |================================//
- forward SendTesterAdminMessage(color, string[]);
- forward carspawn();
- forward MoveCamera(playerid);
- forward AutoScore();
- forward SendMSG();
- forward MoveCamera(playerid);
- forward SendAdminMessage(color, string[]);
- forward logkicktodos(string[]);
- forward logkick(string[]);
- forward logban(string[]);
- forward Relogio(playerid);
- //============================================================================//
- enum pInfo
- {
- pAdminLevel,
- pCash,
- pScore,
- bool:SpawnDance,
- Float:SpawnAngle,
- SpawnTimer,
- pMuted,
- pJailed,
- pBanned,
- }
- new PlayerInfo[MAX_PLAYERS][pInfo];
- //:===========================================================================//
- new gPlayerLogged[MAX_PLAYERS];
- new VecSpawned[MAX_PLAYERS] = (-1);
- new Cash[MAX_PLAYERS];
- new Float:gRandomPlayerSpawns[7][3] =
- {
- {351.12451172,2536.12231445,15.7092},
- {1837.6632,-2435.8079,13.5547},
- {2489.2661,-1667.9122,13.3438},
- {-1955.6119,280.5292,41.0471},
- {2271.2722,1397.3500,42.8203},
- {1506.5234,1227.0442,10.8125},
- {351.12451172,2536.12231445,15.7092}
- };
- new RandomColors [] =
- {
- 0xFFFFFFAA,
- 0x33AA33AA,
- 0x000000FF,
- 0x2641FEAA,
- 0x004CFFAA,
- 0x0800A8AA,
- 0xFF48FFAA,
- 0xDF00E0AA,
- 0xC190FFAA,
- 0xE8D000AA,
- 0xD09C00AA,
- 0xF08400AA,
- 0xFF2600AA,
- 0xFF3620AA,
- 0xE00000AA,
- 0x980000AA,
- };
- new RandomMSG[][] =
- {
- "Em breve teremos nosso site, e divulgaremos aqui!",
- "Adicione este servidor aos seus Favoritos. Assim poderá jogar todos os dias."
- };
- //============================================================================//
- main()
- {
- print("|================================|");
- print("| GM Criado do 0 sem copias! |");
- print("| Nome do GM: Brasil Drift Life |");
- print("| Tipo do GM: Drift |");
- print("|---------| CREDITOS |-----------|");
- print("| Lucas_Locate |");
- print("| Apoio ESTAC SA:MP |");
- print("|================================|");
- }
- public OnFilterScriptInit()
- {
- return 1;
- }
- public OnGameModeInit()
- {
- SetGameModeText("BDL [DRT v1.0a]");
- SetTimer("SendMSG", 100000, true);
- //==================================| Skin Players |======================================//
- AddPlayerClass(60, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(132, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(137, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(158, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(161, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(33, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(258, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(23, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(147, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(68, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(179, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(187, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(203, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(217, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(70, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(83, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(101, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(102, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(103, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(104, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(105, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(106, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(107, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(108, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(109, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(110, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(111, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(112, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(113, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(200, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(114, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(115, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(116, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- print("Stage 1 -----> Skins Loaded");
- //==========================| Fim das Skins |=================================//
- /******************************************************************************/
- UsePlayerPedAnims();
- DisableInteriorEnterExits();
- AllowInteriorWeapons(1);
- SetTimer("carhealth",1000,true);
- SetTimer("MoneyTimer", 999,true);
- SetTimer("JetPack",1000,true);
- SetTimer("AutoScore",120000,true);
- SetTimer("moneyscoreupdate",360000,true);
- print("Stage 2 -----> Dynamics Loaded");
- /****************************************************************************************/
- AddStaticVehicleEx(522,339.72915649,2534.34619141,16.57068443,180.29052734,-1,-1,150000); //NRG-500
- AddStaticVehicleEx(522,342.22851562,2534.34570312,16.57068443,180.28564453,-1,-1,150000); //NRG-500
- AddStaticVehicleEx(522,345.25350952,2534.34570312,16.57068443,180.28564453,-1,-1,150000); //NRG-500
- AddStaticVehicleEx(522,343.85308838,2534.34570312,16.57068443,180.28564453,-1,-1,150000); //NRG-500
- AddStaticVehicleEx(522,340.95269775,2534.34570312,16.57068443,180.28564453,-1,-1,150000); //NRG-500
- AddStaticVehicleEx(522,339.57705688,2538.09375000,16.57068443,180.28564453,-1,-1,150000); //NRG-500
- AddStaticVehicleEx(522,340.80123901,2538.09375000,16.57068443,180.28564453,-1,-1,150000); //NRG-500
- AddStaticVehicleEx(522,342.25079346,2538.09375000,16.57068443,180.28564453,-1,-1,150000); //NRG-500
- AddStaticVehicleEx(522,343.79998779,2538.09375000,16.57068443,180.28564453,-1,-1,150000); //NRG-500
- AddStaticVehicleEx(522,345.32479858,2538.09375000,16.57068443,180.28564453,-1,-1,150000); //NRG-500
- AddStaticVehicleEx(411,345.46646118,2547.48144531,17.09603882,180.04052734,-1,-1,150000); //Infernus
- AddStaticVehicleEx(411,348.64077759,2547.48144531,17.09603882,180.03845215,-1,-1,150000); //Infernus
- AddStaticVehicleEx(411,351.64077759,2547.48144531,17.09603882,180.03845215,-1,-1,150000); //Infernus
- AddStaticVehicleEx(411,355.01565552,2547.48144531,17.09603882,180.03845215,-1,-1,150000); //Infernus
- AddStaticVehicleEx(411,342.34060669,2547.48144531,17.09603882,180.03845215,-1,-1,150000); //Infernus
- AddStaticVehicleEx(415,1016.95251465,1349.70275879,314.37084961,162.50463867,-1,-1,150000); //Cheetah
- AddStaticVehicleEx(415,1019.25195312,1356.75292969,314.37084961,162.50427246,-1,-1,150000); //Cheetah
- AddStaticVehicleEx(415,1021.75195312,1364.32800293,314.37084961,162.50427246,-1,-1,150000); //Cheetah
- AddStaticVehicleEx(415,1024.32727051,1372.47753906,314.37084961,162.50427246,-1,-1,150000); //Cheetah
- AddStaticVehicleEx(415,1027.02709961,1380.80236816,314.37084961,162.50427246,-1,-1,150000); //Cheetah
- AddStaticVehicleEx(415,1029.72680664,1389.07678223,314.37084961,162.50427246,-1,-1,150000); //Cheetah
- AddStaticVehicleEx(522,1007.59570312,1351.54711914,312.12084961,165.35046387,-1,-1,150000); //NRG-500
- AddStaticVehicleEx(522,1009.34570312,1357.04687500,312.12084961,165.34973145,-1,-1,150000); //NRG-500
- AddStaticVehicleEx(522,1010.59570312,1361.79687500,312.12084961,165.34973145,-1,-1,150000); //NRG-500
- AddStaticVehicleEx(522,1012.94604492,1361.27160645,312.12084961,165.34973145,-1,-1,150000); //NRG-500
- AddStaticVehicleEx(522,1011.47009277,1356.49597168,312.12084961,165.34973145,-1,-1,150000); //NRG-500
- AddStaticVehicleEx(522,1009.71972656,1351.29467773,312.12084961,165.34973145,-1,-1,150000); //NRG-500
- AddStaticVehicleEx(522,1014.34460449,1364.85852051,312.12084961,165.34973145,-1,-1,150000); //NRG-500
- AddStaticVehicleEx(522,1011.71911621,1365.45898438,312.12084961,165.34973145,-1,-1,150000); //NRG-500
- AddStaticVehicleEx(522,1012.91894531,1369.70898438,312.12084961,165.34973145,-1,-1,150000); //NRG-500
- AddStaticVehicleEx(522,1015.26904297,1369.15844727,312.12084961,165.34973145,-1,-1,150000); //NRG-500
- AddStaticVehicleEx(411,-1347.99255371,-284.67355347,14.77343559,315.60510254,-1,-1,15); //Infernus
- AddStaticVehicleEx(411,-1351.29370117,-281.42303467,14.77343559,315.60424805,-1,-1,15); //Infernus
- AddStaticVehicleEx(411,-1354.66784668,-278.02264404,14.77343559,315.60424805,-1,-1,15); //Infernus
- AddStaticVehicleEx(411,-1358.51806641,-274.22204590,14.77343559,315.60424805,-1,-1,15); //Infernus
- AddStaticVehicleEx(411,-1344.71765137,-288.03149414,14.77343559,315.60424805,-1,-1,15); //Infernus
- AddStaticVehicleEx(556,-1333.66467285,-283.94033813,14.92343330,22.67492676,-1,-1,15); //Monster A
- AddStaticVehicleEx(556,-1328.91455078,-282.26477051,14.92343330,22.67321777,-1,-1,15); //Monster A
- AddStaticVehicleEx(556,-1324.41406250,-280.26455688,14.92343330,22.67028809,-1,-1,15); //Monster A
- AddStaticVehicleEx(556,-1320.13903809,-278.23892212,14.92343330,22.67028809,-1,-1,15); //Monster A
- AddStaticVehicleEx(522,-1362.57019043,-269.94372559,13.99842453,316.15014648,-1,-1,15); //NRG-500
- AddStaticVehicleEx(522,-1363.76904297,-268.99359131,13.99842453,316.14807129,-1,-1,15); //NRG-500
- AddStaticVehicleEx(522,-1364.89343262,-267.79333496,13.99842453,316.14807129,-1,-1,15); //NRG-500
- AddStaticVehicleEx(522,-1365.99340820,-266.59295654,13.99842453,316.14807129,-1,-1,15); //NRG-500
- AddStaticVehicleEx(522,-1367.31896973,-265.24310303,13.99842453,316.14807129,-1,-1,15); //NRG-500
- AddStaticVehicleEx(522,-1368.84484863,-264.01748657,13.99842453,316.14807129,-1,-1,15); //NRG-500
- AddStaticVehicleEx(522,-1370.29614258,-262.51696777,13.99842453,316.14807129,-1,-1,15); //NRG-500
- AddStaticVehicleEx(411,1894.36376953,-2357.12988281,13.92186928,270.52014160,-1,-1,15); //Infernus
- AddStaticVehicleEx(411,1894.36328125,-2361.52587891,13.92186928,270.51635742,-1,-1,15); //Infernus
- AddStaticVehicleEx(411,1894.41333008,-2365.59912109,13.92186928,270.51635742,-1,-1,15); //Infernus
- AddStaticVehicleEx(411,1894.41308594,-2369.49804688,13.92186928,270.51635742,-1,-1,15); //Infernus
- AddStaticVehicleEx(411,1894.41308594,-2373.54980469,13.92186928,270.51635742,-1,-1,15); //Infernus
- AddStaticVehicleEx(522,1891.19287109,-2385.13037109,13.68911552,244.42041016,-1,-1,15); //NRG-500
- AddStaticVehicleEx(522,1890.54174805,-2387.07617188,13.68911552,244.41833496,-1,-1,15); //NRG-500
- AddStaticVehicleEx(522,1889.81530762,-2389.07324219,13.68911552,244.41833496,-1,-1,15); //NRG-500
- AddStaticVehicleEx(522,1886.68933105,-2387.55029297,13.68911552,244.41833496,-1,-1,15); //NRG-500
- AddStaticVehicleEx(522,1887.36413574,-2385.55273438,13.68911552,244.41833496,-1,-1,15); //NRG-500
- AddStaticVehicleEx(522,1888.08825684,-2383.70312500,13.68911552,244.41833496,-1,-1,15); //NRG-500
- print("Stage 3 -----> Vehicle Loaded");
- //================================| Relogio |=================================//
- SetTimer("Relogio", 1000, 1);
- Textdraw99 = TextDrawCreate(450.000000,5.000000, "--");
- Textdraw88 = TextDrawCreate(551.000000,23.000000,"--");
- TextDrawAlignment(Textdraw99,0);
- TextDrawAlignment(Textdraw88,0);
- TextDrawBackgroundColor(Textdraw99,0xE00000AA);
- TextDrawBackgroundColor(Textdraw88,0x33AA33AA);
- TextDrawFont(Textdraw99,2);
- TextDrawLetterSize(Textdraw99,0.499999,1.500000);
- TextDrawFont(Textdraw88,2);
- TextDrawLetterSize(Textdraw88,0.399999,2.000000);
- TextDrawColor(Textdraw99,0xffffffff);
- TextDrawColor(Textdraw88,0xffffffff);
- TextDrawSetOutline(Textdraw99,1);
- TextDrawSetOutline(Textdraw88,1);
- TextDrawSetProportional(Textdraw99,1);
- TextDrawSetProportional(Textdraw88,1);
- TextDrawSetShadow(Textdraw99,1);
- TextDrawSetShadow(Textdraw88,1);
- print("Stage 4 -----> Relogio Loaded");
- //===============================| Text BDL |=================================//
- fusion = TextDrawCreate(4.000000,435.000000,"*BDL* Brasil Drift Life Versão: v1.0a ");
- TextDrawFont(fusion,2);
- TextDrawColor(fusion,0x33AA33AA);
- TextDrawLetterSize(fusion,0.599999,1.000000);
- TextDrawSetOutline(fusion,1);
- TextDrawSetShadow(fusion,1);
- TextDrawSetProportional(fusion,1);
- TextDrawBackgroundColor(fusion,0x000000ff);
- print("Stage 5 -----> Text BDL Loaded");
- return 1;
- }
- public OnFilterScriptExit()
- {
- for(new objectid; objectid<F_MAX_OBJECTS; objectid++)
- {
- F_DestroyObject(objectid);
- }
- F_ObjectUpdate(false);
- TextDrawHideForAll(Textdraw9);
- TextDrawDestroy(Textdraw9);
- return 1;
- }
- public MoveCamera(playerid)
- {
- SetPlayerCameraPos(playerid, player_x - 2 * floatsin(-PlayerInfo[playerid][SpawnAngle], degrees), player_y - 10 * floatcos(-PlayerInfo[playerid][SpawnAngle], degrees), player_z + 3);
- SetPlayerCameraLookAt(playerid, player_x, player_y, player_z + 0.5);
- PlayerInfo[playerid][SpawnAngle] += 0.5;
- if (PlayerInfo[playerid][SpawnAngle] >= 360.0)
- PlayerInfo[playerid][SpawnAngle] = 0.0;
- }
- public OnGameModeExit()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(VecSpawned[i] != -1)
- {
- DestroyVehicle(VecSpawned[i]);
- VecSpawned[i] = (-1);
- }
- }
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- SetPlayerPos(playerid, player_x,player_y,player_z);
- SetPlayerFacingAngle(playerid, player_angle);
- SetPlayerCameraPos(playerid, camera_x,camera_y,camera_z);
- SetPlayerCameraLookAt(playerid, player_x,player_y,player_z);
- ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1);
- PlayerPlaySound(playerid, 1097,-119.9460,23.1096,12.2238);
- if (PlayerInfo[playerid][SpawnDance]) PlayerInfo[playerid][SpawnTimer] = SetTimerEx("MoveCamera", moving_speed, true, "i", playerid);
- PlayerInfo[playerid][SpawnDance] = false;
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- GivePlayerMoney(playerid, 600000);
- PlayerInfo[playerid][SpawnDance] = true;
- ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1);
- gPlayerLogged[playerid] = 0;
- new name[MAX_PLAYER_NAME], file[256];
- GetPlayerName(playerid, name, sizeof(name));
- format(file, sizeof(file), SERVER_USER_FILE, name);
- if (!dini_Exists(file))
- {
- ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "{33AA33}Brasil Drift Life", "{E67802}Bem vindo, você não está registrado, digite sua senha abaixo", "Registrar", "Sair");
- }
- if(fexist(file))
- {
- ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "{33AA33}Brasil Drift Life", "{E67802}Bem Vindo, você está registrado, Digite sua senha abaixo ", "Login", "Sair");
- }
- new pname[MAX_PLAYER_NAME],
- string[64];
- GetPlayerName(playerid, pname, sizeof(pname));
- format(string, sizeof(string), " %s Entrou no Servidor!", pname);
- SendClientMessageToAll(0x38FF06FF, string);
- {
- TextDrawShowForPlayer(playerid, Textdraw99);
- TextDrawShowForPlayer(playerid, Textdraw88);
- TextDrawShowForPlayer(playerid, Textdraw9);
- }
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- new
- name[MAX_PLAYER_NAME],
- file[256];
- GetPlayerName(playerid, name, sizeof(name));
- format(file, sizeof(file), SERVER_USER_FILE, name);
- if(gPlayerLogged[playerid] == 1)
- {
- dini_IntSet(file, "Score", GetPlayerScore(playerid));
- dini_IntSet(file, "Money", GetPlayerMoney(playerid));
- dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][pAdminLevel]);
- dini_IntSet(file, "Banido",PlayerInfo[playerid][pBanned]);
- dini_IntSet(file, "Preso",PlayerInfo[playerid][pJailed]);
- dini_IntSet(file, "Mudo",PlayerInfo[playerid][pMuted]);
- }
- gPlayerLogged[playerid] = 0;
- KillTimer( PlayerInfo[playerid][SpawnTimer] );
- new
- pname[MAX_PLAYER_NAME],
- string[128];
- GetPlayerName(playerid, pname, sizeof(pname));
- switch(reason)
- {
- case 0: format(string, sizeof(string), " %s saiu do servidor. (Crashed)", pname);
- case 1: format(string, sizeof(string), " %s saiu do servidor. (Saiu)", pname);
- case 2: format(string, sizeof(string), " %s saiu do servidor. (Kicked/Banned)", pname);
- }
- SendClientMessageToAll(0x2641FEAA, string);
- if(VecSpawned[playerid] != -1)
- {
- DestroyVehicle(VecSpawned[playerid]);
- VecSpawned[playerid] = (-1);
- }
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- PlayerInfo[playerid][SpawnAngle] = 0.0;
- PlayerInfo[playerid][SpawnDance] = true;
- KillTimer( PlayerInfo[playerid][SpawnTimer] );
- PlayerPlaySound(playerid, 1186, 0.0, 0.0, 0.0);
- SetCameraBehindPlayer(playerid);
- if(PlayerInfo[playerid][pJailed] == 1)
- {
- TogglePlayerControllable(playerid,0);
- SendClientMessage(playerid, COLOR_LIGHTRED, "Você Não pode fugir Preso owned!!!");
- return 1;
- }
- if(PlayerInfo[playerid][pBanned] == 1)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, "Você nunca pode fugir Ban aqui é Fuck off bitch!!!!");
- Kick(playerid);
- return 1;
- }
- new rand = random(sizeof(gRandomPlayerSpawns));
- SetPlayerPos(playerid, gRandomPlayerSpawns[rand][0], gRandomPlayerSpawns[rand][1], gRandomPlayerSpawns[rand][2]);
- SetPlayerInterior(playerid,0);
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- GameTextForPlayer(playerid,"~y~Morto!!!",4000,3);
- if(killerid != INVALID_PLAYER_ID) SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
- SendDeathMessage(killerid, playerid, reason);
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- return 1;
- }
- //=================================| Comandos do Servidor |===================//
- CMD:drift(playerid, params[])
- {
- SetPlayerInterior(playerid, 0);
- GameTextForPlayer(playerid, "~W~Drift 1", 3000, 5);
- {
- if(IsPlayerInAnyVehicle(playerid) == 1)
- {
- SetVehiclePos(V_ID, 1261.9971,-2014.3324,59.3629);
- }
- else
- {
- SetPlayerPos(playerid, 1261.9971,-2014.3324,59.3629);
- }
- return 1;
- }
- }
- CMD:drift2(playerid, params[])
- {
- SetPlayerInterior(playerid, 0);
- GameTextForPlayer(playerid, "~W~Drift 2", 3000, 5);
- {
- if(IsPlayerInAnyVehicle(playerid) == 1)
- {
- SetVehiclePos(V_ID, 2271.2722,1397.3500,42.8203);
- }
- else
- {
- SetPlayerPos(playerid, 2271.2722,1397.3500,42.8203);
- }
- return 1;
- }
- }
- CMD:drift3(playerid, params[])
- {
- SetPlayerInterior(playerid, 0);
- GameTextForPlayer(playerid, "~W~Drift 3", 3000, 5);
- {
- if(IsPlayerInAnyVehicle(playerid) == 1)
- {
- SetVehiclePos(V_ID, -314.0728,1530.8646,75.3594);
- }
- else
- {
- SetPlayerPos(playerid, -314.0728,1530.8646,75.3594);
- }
- return 1;
- }
- }
- CMD:drift4(playerid, params[])
- {
- SetPlayerInterior(playerid, 0);
- GameTextForPlayer(playerid, "~W~Drift 4", 3000, 5);
- {
- if(IsPlayerInAnyVehicle(playerid) == 1)
- {
- SetVehiclePos(V_ID, -297.3416,1749.6500,42.6875);
- }
- else
- {
- SetPlayerPos(playerid, -297.3416,1749.6500,42.6875);
- }
- return 1;
- }
- }
- CMD:drift5(playerid, params[])
- {
- SetPlayerInterior(playerid, 0);
- GameTextForPlayer(playerid, "~W~Drift 5", 3000, 5);
- {
- if(IsPlayerInAnyVehicle(playerid) == 1)
- {
- SetVehiclePos(V_ID, -2524.2400,-610.8422,132.5625);
- }
- else
- {
- SetPlayerPos(playerid, -2524.2400,-610.8422,132.5625);
- }
- return 1;
- }
- }
- CMD:driftx(playerid, params[])
- {
- SetPlayerInterior(playerid, 0);
- GameTextForPlayer(playerid, "~W~Drift X", 3000, 5);
- {
- if(IsPlayerInAnyVehicle(playerid) == 1)
- {
- SetVehiclePos(V_ID, 3124.4453,3112.7883,4.8585);
- }
- else
- {
- SetPlayerPos(playerid, 3124.4453,3112.7883,4.8585);
- }
- return 1;
- }
- }
- CMD:carro(playerid, params[])
- {
- #pragma unused params
- ShowPlayerDialog(playerid, Dialog, DIALOG_STYLE_LIST, "{33AA33}Veiculos Avenda", "{2641FE}Infernus\n{2641FE}Turismo\n{2641FE}Phoenix\n{2641FE}Cheetah\n{2641FE}Banshee\n{2641FE}Euros\n{2641FE}Buffalo\n{2641FE}Kart\n{2641FE}Hotknife\n{2641FE}Hustler\n{2641FE}Comet\n{2641FE}Stallion\n{2641FE}Sunrise\n{2641FE}Sandking", "Selecionar", "Cancelar");
- return 1;
- }
- CMD:ejetar(playerid, params[])
- {
- new id;
- if(sscanf(params, "u",id)) return SendClientMessage(playerid, cyan, "Use: /ejetar [ID ou Nome] ");
- if(gPlayerLogged[id] == 0) return SendClientMessage(playerid, 0x33AA33AA, "Jogador não está logado");
- if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- if (GetPlayerState(id) == PLAYER_STATE_PASSENGER)
- {
- RemovePlayerFromVehicle(id);
- SendClientMessage(playerid, 0x33AA33AA, "Jogador ejetado...");
- }
- }
- return 1;
- }
- CMD:veh(playerid, params[])
- {
- new Float:pX, Float:pY, Float:pZ, Float:pA, Float:vX, Float:vY, Float:vZ, Float:vA, VecID, bool:WasPInVehicle = false;
- if(sscanf(params, "d", VecID)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /veh [Modelo do veículo ( id ) ]");
- if(VecID >= 400 && VecID <= 611){
- if(IsPlayerInAnyVehicle(playerid)){
- GetVehiclePos(GetPlayerVehicleID(playerid), vX, vY, vZ);
- GetVehicleZAngle(GetPlayerVehicleID(playerid), vA);
- if(GetPlayerState(playerid) == 2)
- SetVehicleToRespawn(GetPlayerVehicleID(playerid));
- else
- RemovePlayerFromVehicle(playerid);
- WasPInVehicle = true;
- }
- else
- {
- GetPlayerPos(playerid, pX, pY, pZ);
- GetPlayerFacingAngle(playerid, pA);
- WasPInVehicle = false;
- }
- if(VecSpawned[playerid] != -1){
- DestroyVehicle(VecSpawned[playerid]);
- VecSpawned[playerid] = (-1);
- }
- if(WasPInVehicle){
- VecSpawned[playerid] = CreateVehicle(VecID, vX, vY, vZ, vA, -1, -1, -1);
- }
- else{
- VecSpawned[playerid] = CreateVehicle(VecID, pX, pY, pZ, pA, -1, -1, -1);
- }
- PutPlayerInVehicle(playerid, VecSpawned[playerid], 0);
- SendClientMessage(playerid, COLOR_GREEN, "** Seu veículo foi Criado!");
- }
- else return SendClientMessage(playerid, COLOR_RED, "** Modelo de veículo ( ID ) inválido!");
- return 1;
- }
- //==============================| Comandos ADM |==============================//
- CMD:curar(playerid, params[])
- {
- new id;
- if (sscanf(params, "u", id)) SendClientMessage(playerid, COLOR_GREEN, "Use: /curar <ID ou Nome>\"");
- else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_SIMPSONS, "Jogador não encontrado");
- if (id == playerid) {SendClientMessage(playerid, COLOR_SIMPSONS, "Você não pode definir sua própria HP!"); return 1;}
- if(PlayerInfo[playerid][pAdminLevel] < 1){SendClientMessage(playerid, COLOR_LIGHTRED, "você não é admin nível exigido para usar este cmd"); return 1;}
- else
- {
- SetPlayerHealth(id, 100.0);
- SendClientMessage(id, COLOR_LIGHTRED, "Você foi curado by admin");
- SendClientMessage(playerid, COLOR_LIGHTRED, "Player Curado");
- }
- return 1;
- }
- CMD:kill(playerid, params[])
- {
- new
- id;
- if (sscanf(params, "u", id)) SendClientMessage(playerid, COLOR_GREEN, "Use: /kill <ID ou Nome>\"");
- else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_GREEN, "Esté Player não está conectado");
- if (id == playerid) {SendClientMessage(playerid, COLOR_SIMPSONS, "Você não pode retirar sua própria HP"); return 1;}
- if(PlayerInfo[playerid][pAdminLevel] < 1){SendClientMessage(playerid, COLOR_LIGHTRED, "você não é admin nível exigido para usar este cmd"); return 1;}
- else
- {
- SetPlayerHealth(id, 0.0);
- SendClientMessage(id, COLOR_LIGHTRED, "Você perdeu sua HP-Life By admin");
- }
- return 1;
- }
- CMD:admins(playerid, params[])
- {
- #pragma unused params
- if(IsPlayerConnected(playerid))
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- new string[128],sendername[MAX_PLAYER_NAME];
- GetPlayerName(i, sendername, sizeof(sendername));
- if(PlayerInfo[i][pAdminLevel] >= 1 && PlayerInfo[i][pAdminLevel] <= 1338)
- {
- new arank[64];
- if(PlayerInfo[playerid][pAdminLevel] == 1) { arank = "Moderador"; }
- else if(PlayerInfo[playerid][pAdminLevel] == 2) { arank = "Global Moderador"; }
- else if(PlayerInfo[playerid][pAdminLevel] == 3) { arank = "Administrador"; }
- else if(PlayerInfo[playerid][pAdminLevel] == 4) { arank = "Socio Admin"; }
- else if(PlayerInfo[playerid][pAdminLevel] == 5) { arank = "Sub-Dono Admin"; }
- else if(PlayerInfo[playerid][pAdminLevel] == 1337) { arank = "Dono"; }
- else if(PlayerInfo[playerid][pAdminLevel] == 1338) { arank = "Dono/Scripter"; }
- else { arank = "Desconhecido"; }
- format(string, sizeof(string), "%s - %s", arank, sendername);
- SendClientMessage(playerid, COLOR_ORANGE, string);
- printf(string);
- }
- }
- }
- }
- return 1;
- }
- CMD:ann(playerid, params[])
- {
- new
- string[128],
- string2[128];
- if (sscanf(params, "s",string2)) SendClientMessage(playerid, COLOR_GREEN, "Use: /ann [TEXTO]");
- if(PlayerInfo[playerid][pAdminLevel] < 3) return SendClientMessage(playerid, cyan, "[Erro]: Você não é um Administrator ou Moderator!");
- format(string, sizeof(string),"%s", string2);
- GameTextForAll(string,5000,3);
- printf("Um Administrador anunciou o seguinte:");
- printf(string2);
- return 1;
- }
- CMD:ban(playerid, params[])
- {
- new str[128], str2[128], id, Name1[MAX_PLAYER_NAME], Name2[MAX_PLAYER_NAME];
- if(sscanf(params, "us", id, str2))
- {
- SendClientMessage(playerid, 0xFF0000FF, "Use: /ban <ID ou Nome> <Motivo>");
- return 1;
- }
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_GREEN, "ERRO: Esté Player não está conectado");
- if(playerid == id) return SendClientMessage(playerid, COLOR_GREEN, "ERRO: Você não pode se banir!");
- if(PlayerInfo[playerid][pAdminLevel] < 3){SendClientMessage(playerid, COLOR_LIGHTRED, "Você não é admin nível exigido para usar este cmd"); return 1;}
- if(PlayerInfo[id][pAdminLevel] >= 3){SendClientMessage(playerid, COLOR_LIGHTRED, "Você foi ( BANIDO ) por um Administrador - Admin!"); return 1;}
- else
- {
- GetPlayerName(playerid, Name1, sizeof(Name1));
- GetPlayerName(id, Name2, sizeof(Name2));
- format(str, sizeof(str), "AdminBan: %s Foi Banido by %s", Name1, Name2, playerid, str2);
- SendClientMessageToAll(TEAM_BLUE_COLOR, str);
- printf(str);
- PlayerInfo[id][pBanned] = 1;
- Ban(id);
- }
- return 1;
- }
- CMD:kick(playerid, params[])
- {
- new str[128], str2[128], id, Name1[MAX_PLAYER_NAME], Name2[MAX_PLAYER_NAME];
- if(sscanf(params, "us", id, str2))
- {
- SendClientMessage(playerid, 0xFF0000FF, "Usage: /kick <ID ou Nome> <Motivo>");
- return 1;
- }
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_GREEN, "ERRO: Esté Player não está conectado");
- if(playerid == id) return SendClientMessage(playerid, COLOR_GREEN, "ERRO: Você não pode se Kick!");
- if(PlayerInfo[playerid][pAdminLevel] < 3){SendClientMessage(playerid, COLOR_LIGHTRED, "Você não é admin nível exigido para usar este cmd"); return 1;}
- if(PlayerInfo[id][pAdminLevel] >= 3){SendClientMessage(playerid, COLOR_LIGHTRED, "Você foi ( Kick ) por um Administrador - Admin!"); return 1;}
- else
- {
- GetPlayerName(playerid, Name1, sizeof(Name1));
- GetPlayerName(id, Name2, sizeof(Name2));
- format(str, sizeof(str), "AdminKicked: %s Foi Kick by %s", Name1, Name2, playerid, str2);
- SendClientMessageToAll(TEAM_BLUE_COLOR, str);
- printf(str);
- Kick(id);
- }
- return 1;
- }
- //======================| AINDA VOU POR MAIS Comandos para ADM |==============//
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- SendClientMessage(playerid, 0xAAAAAAAA, "[AVISO]: Este Servidor Possui Sistema Anti-Roubo, Caso Roubar Será Morto Automaticamente !");
- if(!ispassenger && IsVehicleOccupied(vehicleid)) SetPlayerHealth(playerid, 0.0);
- return 1;
- }
- stock IsVehicleOccupied(vehicleid)
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- if(IsPlayerInVehicle(i, vehicleid) && GetPlayerState(i) == PLAYER_STATE_DRIVER)
- return 1;
- return 0;
- }
- 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 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)
- {
- if(newkeys & Reparar)
- {
- RepairVehicle(GetPlayerVehicleID(playerid));
- GameTextForPlayer(playerid,"~w~Veiculo Reparado!",1000,1);
- }
- return 1;
- }
- public OnRconLoginAttempt(ip[], password[], success)
- {
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- 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[])
- {
- new file[256];
- new string[128];
- if (dialogid == 1)
- {
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- format(file, sizeof(file), SERVER_USER_FILE, name);
- if(!response) return Kick(playerid);
- if (!strlen(inputtext)) return
- ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Brasil Drift Life", "Bem-vindo, Voçê não está registrada, digite sua senha abaixo", "Register", "Sair");
- dini_Create(file);
- dini_IntSet(file, "Key", udb_hash(inputtext));
- dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][pAdminLevel] = 0);
- dini_IntSet(file, "Money",PlayerInfo[playerid][pCash] = 500);
- dini_IntSet(file, "Score",PlayerInfo[playerid][pScore] = 0);
- dini_IntSet(file, "Preso",PlayerInfo[playerid][pJailed] = 0);
- dini_IntSet(file, "Mudo",PlayerInfo[playerid][pMuted] = 0);
- dini_IntSet(file, "Banido",PlayerInfo[playerid][pBanned] = 0);
- format(string, 128, "[Warning]: Você foi registrado com sucesso nickname: %s sua senha: %s, Você está longado.", name, inputtext);
- SendClientMessage(playerid, 0xD09C00AA, string);
- gPlayerLogged[playerid] = 1;
- }
- if (dialogid == 2)
- {
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- format(file, sizeof(file), SERVER_USER_FILE, name);
- if(!response) return Kick(playerid);
- if (!strlen(inputtext)) return ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "{33AA33}Brasil Drift Fife", "{E67802}Digite sua senha abaixo para se cadastrar", "Login", "Sair");
- new tmp;
- tmp = dini_Int(file, "Password");
- if(udb_hash(inputtext) != tmp) {
- SendClientMessage(playerid, 0xF08400AA, "Senha errada.");
- ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "{33AA33}Brasil Drift Life", "{E67802}Digite sua senha abaixo para se cadastrar", "Login", "Sair");
- }
- else
- {
- gPlayerLogged[playerid] = 1;
- PlayerInfo[playerid][pAdminLevel] = dini_Int(file, "AdminLevel");
- SetPlayerScore(playerid, dini_Int(file, "Score"));
- GivePlayerCash(playerid, dini_Int(file, "Money"));
- PlayerInfo[playerid][pMuted] = dini_Int(file, "Mudo");
- PlayerInfo[playerid][pJailed] = dini_Int(file, "Preso");
- PlayerInfo[playerid][pBanned] = dini_Int(file, "Banido");
- SendClientMessage(playerid,0xF08400AA, "[Warning]: Você está longado!");
- }
- }
- if(dialogid == Dialog)
- if(!response) return 1;
- {
- switch(listitem)
- {
- case 0:
- {
- new Float:X, Float:Y, Float:Z, Float:Ang, Int, pCarro;
- Int = GetPlayerInterior(playerid);
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, Ang);
- GetPlayerInterior(playerid);
- pCarro = CreateVehicle(411, X, Y, Z, Ang, -1, -1, -1);
- LinkVehicleToInterior(pCarro, Int);
- PutPlayerInVehicle(playerid, pCarro, 0);
- }
- case 1:
- {
- new Float:X, Float:Y, Float:Z, Float:Ang, Int, pCarro;
- Int = GetPlayerInterior(playerid);
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, Ang);
- pCarro = CreateVehicle(451, X, Y, Z, Ang, -1, -1, -1);
- LinkVehicleToInterior(pCarro, Int);
- PutPlayerInVehicle(playerid, pCarro, 0);
- }
- case 2:
- {
- new Float:X, Float:Y, Float:Z, Float:Ang, Int, pCarro;
- Int = GetPlayerInterior(playerid);
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, Ang);
- pCarro = CreateVehicle(603, X, Y, Z, Ang, -1, -1, -1);
- LinkVehicleToInterior(pCarro, Int);
- PutPlayerInVehicle(playerid, pCarro, 0);
- }
- case 3:
- {
- new Float:X, Float:Y, Float:Z, Float:Ang, Int, pCarro;
- Int = GetPlayerInterior(playerid);
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, Ang);
- pCarro = CreateVehicle(415, X, Y, Z, Ang, -1, -1, -11);
- LinkVehicleToInterior(pCarro, Int);
- PutPlayerInVehicle(playerid, pCarro, 0);
- }
- case 4:
- {
- new Float:X, Float:Y, Float:Z, Float:Ang, Int, pCarro;
- Int = GetPlayerInterior(playerid);
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, Ang);
- pCarro = CreateVehicle(429, X, Y, Z, Ang, -1, -1, -1);
- LinkVehicleToInterior(pCarro, Int);
- PutPlayerInVehicle(playerid, pCarro, 0);
- }
- case 5:
- {
- new Float:X, Float:Y, Float:Z, Float:Ang, Int, pCarro;
- Int = GetPlayerInterior(playerid);
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, Ang);
- pCarro = CreateVehicle(587, X, Y, Z, Ang, -1, -1, -1);
- LinkVehicleToInterior(pCarro, Int);
- PutPlayerInVehicle(playerid, pCarro, 0);
- }
- case 6:
- {
- new Float:X, Float:Y, Float:Z, Float:Ang, Int, pCarro;
- Int = GetPlayerInterior(playerid);
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, Ang);
- pCarro = CreateVehicle(402, X, Y, Z, Ang, -1, -1, -1);
- LinkVehicleToInterior(pCarro, Int);
- PutPlayerInVehicle(playerid, pCarro, 0);
- }
- case 7:
- {
- new Float:X, Float:Y, Float:Z, Float:Ang, Int, pCarro;
- Int = GetPlayerInterior(playerid);
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, Ang);
- pCarro = CreateVehicle(571, X, Y, Z, Ang, -1, -1, -1);
- LinkVehicleToInterior(pCarro, Int);
- PutPlayerInVehicle(playerid, pCarro, 0);
- }
- case 8:
- {
- new Float:X, Float:Y, Float:Z, Float:Ang, Int, pCarro;
- Int = GetPlayerInterior(playerid);
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, Ang);
- pCarro = CreateVehicle(434, X, Y, Z, Ang, -1, -1, -1);
- LinkVehicleToInterior(pCarro, Int);
- PutPlayerInVehicle(playerid, pCarro, 0);
- }
- case 9:
- {
- new Float:X, Float:Y, Float:Z, Float:Ang, Int, pCarro;
- Int = GetPlayerInterior(playerid);
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, Ang);
- pCarro = CreateVehicle(545, X, Y, Z, Ang, -1, -1, -1);
- LinkVehicleToInterior(pCarro, Int);
- PutPlayerInVehicle(playerid, pCarro, 0);
- }
- case 10:
- {
- new Float:X, Float:Y, Float:Z, Float:Ang, Int, pCarro;
- Int = GetPlayerInterior(playerid);
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, Ang);
- pCarro = CreateVehicle(480, X, Y, Z, Ang, -1, -1, -1);
- LinkVehicleToInterior(pCarro, Int);
- PutPlayerInVehicle(playerid, pCarro, 0);
- }
- case 11:
- {
- new Float:X, Float:Y, Float:Z, Float:Ang, Int, pCarro;
- Int = GetPlayerInterior(playerid);
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, Ang);
- pCarro = CreateVehicle(439, X, Y, Z, Ang, -1, -1, -1);
- LinkVehicleToInterior(pCarro, Int);
- PutPlayerInVehicle(playerid, pCarro, 0);
- }
- case 12:
- {
- new Float:X, Float:Y, Float:Z, Float:Ang, Int, pCarro;
- Int = GetPlayerInterior(playerid);
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, Ang);
- pCarro = CreateVehicle(550, X, Y, Z, Ang, -1, -1, -1);
- LinkVehicleToInterior(pCarro, Int);
- PutPlayerInVehicle(playerid, pCarro, 0);
- }
- case 13:
- {
- new Float:X, Float:Y, Float:Z, Float:Ang, Int, pCarro;
- Int = GetPlayerInterior(playerid);
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, Ang);
- pCarro = CreateVehicle(495, X, Y, Z, Ang, -1, -1, -1);
- LinkVehicleToInterior(pCarro, Int);
- PutPlayerInVehicle(playerid, pCarro, 0);
- }
- case 14:
- {
- return 1;
- }
- }
- }
- return 1;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- return 1;
- }
- public carspawn()
- {
- for (new i = 0; i < MAX_VEHICLES; i++)
- {
- SetVehicleToRespawn(i);
- GameTextForAll("~y~ Todos os veículos voltarão ao seus lugares!",2000,1);
- }
- return 1;
- }
- public AutoScore()
- {
- for (new i=0; i < MAX_PLAYERS; i++)
- {
- if (IsPlayerConnected(i))
- {
- new
- pointsx;
- pointsx = GetPlayerScore(i);
- SetPlayerScore(i, pointsx + 1);
- PlayerInfo[i][pScore] += 1;
- }
- }
- return 1;
- }
- public SendMSG()
- {
- new random2 = random(sizeof(RandomColors));
- new randMSG = random(sizeof(RandomMSG));
- SendClientMessageToAll(RandomColors[random2], RandomMSG[randMSG]);
- }
- public Relogio(playerid)
- {
- new string[256];
- new string2[256];
- new year, month, day;
- new hour, minute, second;
- getdate(year, month, day);
- gettime(hour,minute,second);
- new mtext[20];
- getdate(year, month, day);
- if(month == 1) { mtext = "Janeiro"; }
- else if(month == 2) { mtext = "Fevereiro"; }
- else if(month == 3) { mtext = "Março"; }
- else if(month == 4) { mtext = "Abril"; }
- else if(month == 5) { mtext = "Maio"; }
- else if(month == 6) { mtext = "Junho"; }
- else if(month == 7) { mtext = "Julho"; }
- else if(month == 8) { mtext = "Agosto"; }
- else if(month == 9) { mtext = "Setembro"; }
- else if(month == 10) { mtext = "Outubro"; }
- else if(month == 11) { mtext = "Novembro"; }
- else if(month == 12) { mtext = "Dezembro"; }
- format(string, sizeof(string), "%d %s, %d", day, mtext, year);
- TextDrawSetString(Text:Textdraw99, string);
- format(string2, sizeof(string2), "%d:%d:%d", hour, minute, second);
- TextDrawSetString(Text:Textdraw88, string2);
- }
- stock GivePlayerCash(playerid, money)
- {
- Cash[playerid] += money;
- ResetMoneyBar(playerid);
- UpdateMoneyBar(playerid,Cash[playerid]);
- return Cash[playerid];
- }
- stock SetPlayerCash(playerid, money)
- {
- Cash[playerid] = money;
- ResetMoneyBar(playerid);
- UpdateMoneyBar(playerid,Cash[playerid]);
- return Cash[playerid];
- }
- stock ResetPlayerCash(playerid)
- {
- Cash[playerid] = 0;
- ResetMoneyBar(playerid);
- UpdateMoneyBar(playerid,Cash[playerid]);
- return Cash[playerid];
- }
- stock GetPlayerCash(playerid)
- {
- return Cash[playerid];
- }
- stock sscanf(string[], format[], {Float,_}:...)
- {
- #if defined isnull
- if (isnull(string))
- #else
- if (string[0] == 0 || (string[0] == 1 && string[1] == 0))
- #endif
- {
- return format[0];
- }
- #pragma tabsize 4
- new
- formatPos = 0,
- stringPos = 0,
- paramPos = 2,
- paramCount = numargs(),
- delim = ' ';
- while (string[stringPos] && string[stringPos] <= ' ')
- {
- stringPos++;
- }
- while (paramPos < paramCount && string[stringPos])
- {
- switch (format[formatPos++])
- {
- case '\0':
- {
- return 0;
- }
- case 'i', 'd':
- {
- new
- neg = 1,
- num = 0,
- ch = string[stringPos];
- if (ch == '-')
- {
- neg = -1;
- ch = string[++stringPos];
- }
- do
- {
- stringPos++;
- if ('0' <= ch <= '9')
- {
- num = (num * 10) + (ch - '0');
- }
- else
- {
- return -1;
- }
- }
- while ((ch = string[stringPos]) > ' ' && ch != delim);
- setarg(paramPos, 0, num * neg);
- }
- case 'h', 'x':
- {
- new
- num = 0,
- ch = string[stringPos];
- do
- {
- stringPos++;
- switch (ch)
- {
- case 'x', 'X':
- {
- num = 0;
- continue;
- }
- case '0' .. '9':
- {
- num = (num << 4) | (ch - '0');
- }
- case 'a' .. 'f':
- {
- num = (num << 4) | (ch - ('a' - 10));
- }
- case 'A' .. 'F':
- {
- num = (num << 4) | (ch - ('A' - 10));
- }
- default:
- {
- return -1;
- }
- }
- }
- while ((ch = string[stringPos]) > ' ' && ch != delim);
- setarg(paramPos, 0, num);
- }
- case 'c':
- {
- setarg(paramPos, 0, string[stringPos++]);
- }
- case 'f':
- {
- new changestr[16], changepos = 0, strpos = stringPos;
- while(changepos < 16 && string[strpos] && string[strpos] != delim)
- {
- changestr[changepos++] = string[strpos++];
- }
- changestr[changepos] = '\0';
- setarg(paramPos,0,_:floatstr(changestr));
- }
- case 'p':
- {
- delim = format[formatPos++];
- continue;
- }
- case '\'':
- {
- new
- end = formatPos - 1,
- ch;
- while ((ch = format[++end]) && ch != '\'') {}
- if (!ch)
- {
- return -1;
- }
- format[end] = '\0';
- if ((ch = strfind(string, format[formatPos], false, stringPos)) == -1)
- {
- if (format[end + 1])
- {
- return -1;
- }
- return 0;
- }
- format[end] = '\'';
- stringPos = ch + (end - formatPos);
- formatPos = end + 1;
- }
- case 'u':
- {
- new
- end = stringPos - 1,
- id = 0,
- bool:num = true,
- ch;
- while ((ch = string[++end]) && ch != delim)
- {
- if (num)
- {
- if ('0' <= ch <= '9')
- {
- id = (id * 10) + (ch - '0');
- }
- else
- {
- num = false;
- }
- }
- }
- if (num && IsPlayerConnected(id))
- {
- setarg(paramPos, 0, id);
- }
- else
- {
- #if !defined foreach
- #define foreach(%1,%2) for (new %2 = 0; %2 < MAX_PLAYERS; %2++) if (IsPlayerConnected(%2))
- #define __SSCANF_FOREACH__
- #endif
- string[end] = '\0';
- num = false;
- new
- name[MAX_PLAYER_NAME];
- id = end - stringPos;
- foreach (Player, playerid)
- {
- GetPlayerName(playerid, name, sizeof (name));
- if (!strcmp(name, string[stringPos], true, id))
- {
- setarg(paramPos, 0, playerid);
- num = true;
- break;
- }
- }
- if (!num)
- {
- setarg(paramPos, 0, INVALID_PLAYER_ID);
- }
- string[end] = ch;
- #if defined __SSCANF_FOREACH__
- #endif
- }
- stringPos = end;
- }
- case 's', 'z':
- {
- new
- i = 0,
- ch;
- if (format[formatPos])
- {
- while ((ch = string[stringPos++]) && ch != delim)
- {
- setarg(paramPos, i++, ch);
- }
- if (!i)
- {
- return -1;
- }
- }
- else
- {
- while ((ch = string[stringPos++]))
- {
- setarg(paramPos, i++, ch);
- }
- }
- stringPos--;
- setarg(paramPos, i, '\0');
- }
- default:
- {
- continue;
- }
- }
- while (string[stringPos] && string[stringPos] != delim && string[stringPos] > ' ')
- {
- stringPos++;
- }
- while (string[stringPos] && (string[stringPos] == delim || string[stringPos] <= ' '))
- {
- stringPos++;
- }
- paramPos++;
- }
- do
- {
- if ((delim = format[formatPos++]) > ' ')
- {
- if (delim == '\'')
- {
- while ((delim = format[formatPos++]) && delim != '\'') {}
- }
- else if (delim != 'z')
- {
- return delim;
- }
- }
- }
- while (delim > ' ');
- return 0;
- }
- //============================================================================//
- // ******* Brasil Drift Life [DRT v1.0a]******* //
- // By Lucas_Locate //
- // * Apoio ESTAC SA:MP * //
- //============================================================================//
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement