Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*Sistema de estacionamento desenvolvido por Lucas OutLawz nao remova os créditos,
- o uso é livre, desde que os créditos não sejam removidos.*/
- /*Sistema de estacionamento ainda é beta contém alguns erros que irei
- consertar nas próximas versões*/
- #include <a_samp>
- #include <y_objects>
- //===========================================cores====================================//
- #define Estacio 0x0000CDAA
- #define Estacio1 0x7FFF00AA
- #define Branco 0xFFFFFFAA
- #define Azul 0x1C86EEAA
- #define PREÇO 250 // Preço do estacionamento!
- //======================================================================================//
- forward ChecarEstacionamento();
- new Estacionamento[MAX_PLAYERS];
- //===================================================================================//
- public OnFilterScriptInit()
- {
- SetTimer("ChecarEstacionamento", 500, true);
- Object_Object();
- /*Objetos dos estacionamentos*/
- CreateObject(1323,2307.66699219,-1212.22705078,24.55812073,0.00000000,0.00000000,270.00000000);
- CreateObject(3502,2314.58862305,-1217.77246094,21.47956467,0.00000000,0.00000000,0.00000000);
- CreateObject(3502,2360.03271484,-1272.33740234,21.34354019,0.00000000,0.00000000,0.00000000);
- CreateObject(1323,2366.34497070,-1276.91687012,24.32210159,0.00000000,0.00000000,269.99804688);
- CreateObject(1323,2366.35205078,-1276.84130859,24.32210159,0.00000000,0.00000000,97.99450684);
- CreateObject(1323,2307.66699219,-1212.22656250,24.55812073,0.00000000,0.00000000,89.99450684);
- CreateObject(1233,1635.36560059,-1172.27343750,33.32959747,0.00000000,0.00000000,0.00000000);
- CreateObject(1233,1626.79577637,-1156.13854980,24.46592903,0.00000000,0.00000000,0.00000000);
- CreateObject(4639,1538.00427246,-1452.38464355,14.09489727,0.00000000,0.00000000,0.00000000);
- CreateObject(8406,2305.44775391,1383.25000000,15.34565258,0.00000000,0.00000000,0.00000000);
- CreateObject(8406,2305.16699219,1522.94714355,15.34565258,0.00000000,0.00000000,0.00000000);
- CreateObject(10837,2317.68017578,1528.25830078,13.99880409,0.00000000,0.00000000,0.00000000);
- CreateObject(10837,2317.44873047,1378.04724121,14.14228058,0.00000000,0.00000000,164.50000000);
- CreateObject(1237,2316.89453125,1522.88073730,9.82031250,0.00000000,0.00000000,0.00000000);
- CreateObject(1237,2315.62133789,1522.80883789,9.82031250,0.00000000,0.00000000,0.00000000);
- CreateObject(1237,2314.19360352,1522.88586426,9.82031250,0.00000000,0.00000000,0.00000000);
- CreateObject(1237,2312.68066406,1522.89916992,9.82031250,0.00000000,0.00000000,0.00000000);
- CreateObject(1237,2297.93627930,1383.47021484,9.82031250,0.00000000,0.00000000,0.00000000);
- CreateObject(1237,2299.02856445,1383.39599609,9.82031250,0.00000000,0.00000000,0.00000000);
- CreateObject(1237,2300.14086914,1383.47351074,9.82031250,0.00000000,0.00000000,0.00000000);
- CreateObject(1237,2301.29711914,1383.43310547,9.82031250,0.00000000,0.00000000,0.00000000);
- CreateObject(4100,2232.29931641,2032.51818848,11.44698334,0.00000000,0.00000000,320.00000000);
- CreateObject(4100,2246.06884766,2032.48632812,11.44698334,0.00000000,0.00000000,319.99877930);
- CreateObject(1237,2253.04565430,2032.54260254,9.82031250,0.00000000,0.00000000,0.00000000);
- CreateObject(4638,2261.71240234,2034.05664062,11.51689243,0.00000000,0.00000000,90.00000000);
- //================================================================================//
- print("\n--------------------------------------");
- print(" --Sistema de Estacionamento 1.0-- ");
- print(" FilterScript Estacionamento por ::Lucas OutLawz::");
- print(" Não Remova os Créditos por Favor! ");
- print("\n--------------------------------------");
- return 1;
- }
- //=============================================================================//
- public OnPlayerDisconnect(playerid, reason)
- {
- Object_OnPlayerDisconnect(playerid, reason);
- return 1;
- }
- public ChecarEstacionamento()
- {
- for(new playerid; playerid < MAX_PLAYERS; playerid++)
- {
- if(!IsPlayerConnected( playerid))continue;
- if(PlayerToPoint(6.0, playerid, 2314.5476,-1218.2231,24.2061) && !Estacionamento[playerid])
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- GivePlayerMoney(playerid, PREÇO);
- TogglePlayerControllable(playerid,0);
- GameTextForPlayer(playerid,"~r~Pagando Estacionamento",2000,3);
- SendClientMessage(playerid, Estacio1, "Pagamento sendo efetuado, /estacionar para prosseguir!");
- PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
- Estacionamento[playerid] = 1;
- }
- } else if(!PlayerToPoint(6.0, playerid, 2314.5476,-1218.2231,24.2061) && Estacionamento[playerid])
- {
- GameTextForPlayer(playerid,"~g~Estacionamento Pago!",1000,3);
- SendClientMessage(playerid, Estacio, "Pagamento Efetuado com Sucesso!");
- PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
- Estacionamento[playerid] = 0;
- }
- }
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(strcmp(cmdtext, "/estacionar", true) ==0)//Comando para liberar o carro!
- {
- SendClientMessage(playerid, Azul, "Bom dia Sr.(a)!");
- SendClientMessage(playerid, Branco, "Seu veiculo foi liberado estacione ou saia do estacionamento");
- TogglePlayerControllable(playerid,1);
- return 1;
- }
- if(strcmp(cmdtext, "/info", true) ==0)//Creditos!
- {
- SendClientMessage(playerid, Branco,"=============CREDITOS==============");
- SendClientMessage(playerid, Azul," Criado por: Lucas OutLawz!");
- return 1;
- }
- return 1;
- }
- PlayerToPoint(Float:radius, playerid, Float:X, Float:Y, Float:Z)
- {
- new Float:oldpos[3], Float:temppos[3];
- GetPlayerPos(playerid, oldpos[0], oldpos[1], oldpos[2]);
- temppos[0] = (oldpos[0] -X);
- temppos[1] = (oldpos[1] -Y);
- temppos[2] = (oldpos[2] -Z);
- if(((temppos[0] < radius) && (temppos[0] > -radius)) && ((temppos[1] < radius) && (temppos[1] > -radius)) && ((temppos[2] < radius) && (temppos[2] > -radius)))
- {
- return true;
- }
- return false;
- }
- /*Sistema de estacionamento desenvolvido por Lucas OutLawz nao remova os créditos,
- o uso é livre, desde que os créditos não sejam removidos.*/
- /*Sistema de estacionamento ainda é beta contém alguns erros que irei
- consertar nas próximas versões*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement