Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*Nao retire os Creditos :)*/
- #include <a_samp>
- #include <zcmd>
- #include <sscanf2>
- /*MACROS*/
- #define SendClientFormat(%0,%1,%2,%3); format(string, sizeof(string), %2, %3); SendClientMessage(%0, %1, string);
- /*ENUMS*/
- enum pProf
- {
- Profissao
- }
- /*NEWS*/
- new C_Caminhao[8];
- new T_Caminhao[8];
- new Prof[MAX_PLAYERS][pProf];
- new respawntrailer;
- new carregado[MAX_PLAYERS] = 0;
- /*Profissao*/
- #define Caminhoneiro 0
- #define C_Caminhoneiro 0x089226FF
- /*DIALOGS*/
- #define DIALOG_CAMINHAO 22
- /*CORES*/
- #define COR_ERRO 0xFF0000FF
- #define Verde 0x31E045FF
- #define Azul 0x0091FFFF
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
- print("\n--------------------------------------");
- print(" Criado por: SmokiieGamer");
- print(" http://forum.sa-mp.com/member.php?u=282148 ");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- main()
- {
- print("\n----------------------------------");
- print(" Blank Gamemode by your name here");
- print("----------------------------------\n");
- }
- #endif
- public OnPlayerConnect(playerid)
- {
- /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
- RemoveBuildingForPlayer(playerid, 8118, 1343.6875, 1130.3906, 13.5313, 0.25);
- RemoveBuildingForPlayer(playerid, 1331, 1303.2188, 1102.7188, 10.6250, 0.25);
- RemoveBuildingForPlayer(playerid, 1338, 1303.2344, 1107.8906, 10.4922, 0.25);
- RemoveBuildingForPlayer(playerid, 1438, 1384.8828, 1101.3750, 9.8125, 0.25);
- RemoveBuildingForPlayer(playerid, 1420, 1384.0391, 1111.6250, 9.8203, 0.25);
- RemoveBuildingForPlayer(playerid, 1219, 1312.8906, 1128.3594, 10.0625, 0.25);
- RemoveBuildingForPlayer(playerid, 1420, 1384.0391, 1125.2891, 9.8203, 0.25);
- RemoveBuildingForPlayer(playerid, 1219, 1312.8906, 1134.0781, 10.0625, 0.25);
- RemoveBuildingForPlayer(playerid, 1219, 1312.8906, 1136.8984, 10.0625, 0.25);
- RemoveBuildingForPlayer(playerid, 1219, 1312.8906, 1131.1719, 10.0625, 0.25);
- RemoveBuildingForPlayer(playerid, 8065, 1343.6875, 1130.3906, 13.5313, 0.25);
- RemoveBuildingForPlayer(playerid, 1616, 1319.6719, 1152.8594, 14.8047, 0.25);
- RemoveBuildingForPlayer(playerid, 640, 1356.6484, 1152.9453, 10.5156, 0.25);
- RemoveBuildingForPlayer(playerid, 640, 1336.8672, 1158.6484, 10.5156, 0.25);
- RemoveBuildingForPlayer(playerid, 1420, 1384.0391, 1138.7891, 9.8203, 0.25);
- RemoveBuildingForPlayer(playerid, 1420, 1384.0391, 1151.9688, 9.8203, 0.25);
- RemoveBuildingForPlayer(playerid, 640, 1348.5547, 1163.9063, 10.5156, 0.25);
- RemoveBuildingForPlayer(playerid, 1334, 1338.8047, 1164.1563, 10.9297, 0.25);
- /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
- SetPlayerColor(playerid, 0xFFFFFFFF);
- /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
- C_Caminhao[0] = CreateVehicle(403, 1419.5896, 973.8277, 11.1205, 0.0000, -1, -1, 100);
- C_Caminhao[1] = CreateVehicle(403, 1414.6193, 973.9520, 11.1205, 0.0000, -1, -1, 100);
- C_Caminhao[2] = CreateVehicle(403, 1408.9634, 974.0184, 11.1205, 0.0000, -1, -1, 100);
- C_Caminhao[3] = CreateVehicle(403, 1404.2325, 974.1080, 11.1205, 0.0000, -1, -1, 100);
- C_Caminhao[4] = CreateVehicle(403, 1430.1726, 974.4286, 11.1205, 0.0000, -1, -1, 100);
- C_Caminhao[5] = CreateVehicle(403, 1435.1686, 974.4653, 11.1205, 0.0000, -1, -1, 100);
- C_Caminhao[6] = CreateVehicle(403, 1447.0651, 974.4630, 11.1205, 0.0000, -1, -1, 100);
- C_Caminhao[7] = CreateVehicle(403, 1441.2657, 974.7684, 11.1205, 0.0000, -1, -1, 100);
- /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
- T_Caminhao[0] = CreateVehicle(435, 1425.9762, 1024.6429, 11.1868, 90.0000, -1, -1, 100);
- T_Caminhao[1] = CreateVehicle(435, 1426.1826, 1018.0960, 11.1868, 90.0000, -1, -1, 100);
- T_Caminhao[2] = CreateVehicle(435, 1425.7996, 1044.3285, 11.1868, 90.0000, -1, -1, 100);
- T_Caminhao[3] = CreateVehicle(435, 1425.7688, 1050.0950, 11.1868, 90.0000, -1, -1, 100);
- T_Caminhao[4] = CreateVehicle(435, 1425.6958, 1055.3429, 11.1868, 90.0000, -1, -1, 100);
- T_Caminhao[5] = CreateVehicle(435, 1425.6078, 1060.7788, 11.1868, 90.0000, -1, -1, 100);
- T_Caminhao[6] = CreateVehicle(435, 1425.4144, 1071.6368, 11.1868, 90.0000, -1, -1, 100);
- T_Caminhao[7] = CreateVehicle(435, 1425.0706, 1081.7444, 11.1868, 90.0000, -1, -1, 100);
- /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
- CreateObject(3578, 1376.72400, 1095.58923, 10.42170, 0.00000, 0.00000, 89.00000);
- CreateObject(3578, 1376.98645, 1107.28748, 10.42170, 0.00000, 0.00000, 89.00000);
- CreateObject(3578, 1377.21985, 1118.91296, 10.42170, 0.00000, 0.00000, 89.00000);
- CreateObject(3578, 1377.46350, 1130.87292, 10.42170, 0.00000, 0.00000, 89.00000);
- CreateObject(3578, 1377.69263, 1142.42480, 10.42170, 0.00000, 0.00000, 89.00000);
- CreateObject(3578, 1364.22681, 1095.81897, 10.42170, 0.00000, 0.00000, 89.00000);
- CreateObject(3578, 1364.39746, 1107.87024, 10.42170, 0.00000, 0.00000, 89.00000);
- CreateObject(3578, 1364.53650, 1119.40710, 10.42170, 0.00000, 0.00000, 89.00000);
- CreateObject(3578, 1364.58936, 1131.00867, 10.42170, 0.00000, 0.00000, 89.00000);
- CreateObject(3578, 1364.81384, 1143.00842, 10.42170, 0.00000, 0.00000, 89.00000);
- /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
- Create3DTextLabel("Carregue\n{FF0000}Aqui !", 0xFFFFFFFF, 1370.212524, 1090.768676, 10.812978, 40.0, 0, 0);
- Create3DTextLabel("Descarregue\n{FF0000}Aqui !", 0xFFFFFFF, 1196.043090, -888.458740, 43.040676, 40, 0,0);
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == DIALOG_CAMINHAO)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- DisablePlayerCheckpoint(playerid);
- SetPlayerCheckpoint(playerid, 1196.043090, -888.458740, 43.040676, 0.0);
- carregado[playerid] = 1;
- SendClientMessage(playerid, Verde, "| CARREGAMENTO | Foi marcado um ponto vermelho no seu mapa. Siga-o para descarregar !");
- return 1;
- } // CASE QUISER FAZER OUTROS CARREGAMENTOS, FASSA IGUAL AO DE CIMA.
- }
- }
- }
- return 1;
- }
- CMD:carregar(playerid)
- {
- if(Prof[playerid][Profissao] == Caminhoneiro)
- {
- if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 403)
- {
- if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
- {
- if(PlayerToPoint(playerid, 30.0, 1370.212524, 1090.768676, 10.812978))
- {
- if(carregado[playerid] == 0)
- {
- new StringCat[700];
- strcat(StringCat, "{FFFFFF}BurgerShot LS {D2691E}» {00FF00}R$800\n");
- ShowPlayerDialog(playerid, DIALOG_CAMINHAO, DIALOG_STYLE_LIST, "{FFFFFF}Carregamento", StringCat, "{FFFFFF}Carregar", "{FFFFFF}Cancelar");
- carregado[playerid] = 1;
- return 1;
- }
- else SendClientMessage(playerid, COR_ERRO, "Seu caminhão já está carregado!");
- return 1;
- }
- else SendClientMessage(playerid, COR_ERRO, "Você não está na Área de Carregamento!");
- return 1;
- }
- else SendClientMessage(playerid, COR_ERRO, "Você não pussui uma carga!");
- return 1;
- }
- else SendClientMessage(playerid, COR_ERRO, "Você não está em um Caminhão!");
- return 1;
- }
- else SendClientMessage(playerid, COR_ERRO, "Você não está dirigindo um veiculo!");
- return 1;
- }
- else SendClientMessage(playerid, COR_ERRO, "Você não tem permissão!");
- return 1;
- }
- CMD:descarregar(playerid)
- {
- if(Prof[playerid][Profissao] == Caminhoneiro)
- {
- if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 403)
- {
- if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
- {
- if(carregado[playerid] == 0)
- {
- SendClientMessage(playerid, COR_ERRO, "O seu caminhão não está carregado!");
- return 1;
- }
- if(carregado[playerid] == 1)
- {
- if(PlayerToPoint(playerid, 10.0, 1196.043090, -888.458740, 43.040676))
- carregado[playerid] = 0;
- DisablePlayerCheckpoint(playerid);
- SendClientMessage(playerid, Verde, "Você descarregou o seu caminhão e ganhou R$800");
- GivePlayerMoney(playerid, 800);
- respawntrailer = (GetVehicleTrailer(GetPlayerVehicleID(playerid)));
- SetVehicleToRespawn(respawntrailer);
- return 1;
- }
- else SendClientMessage(playerid, COR_ERRO, "Você não está na área de descarregamento!");
- return 1;
- }
- else SendClientMessage(playerid, COR_ERRO, "Você não pussui uma carga!");
- return 1;
- }
- else SendClientMessage(playerid, COR_ERRO, "Você não esá em um veiculo!");
- return 1;
- }
- else SendClientMessage(playerid, COR_ERRO, "Você não tem permissão!");
- return 1;
- }
- CMD:setprof(playerid, params[])
- {
- new id, string[500];
- new aname[24], pname[24];
- GetPlayerName(id, aname, sizeof(aname));
- GetPlayerName(playerid, pname, sizeof(pname));
- if(IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COR_ERRO, "| ERRO | Você não está logado na RCON.");
- if(sscanf(params, "d", id)) return SendClientMessage(playerid, COR_ERRO, "| ERRO | Uso Correto: /Setprof [id].");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COR_ERRO, "| ERRO | Player não conectado.");
- SendClientFormat(id, Verde, "O(A) admin %s tornou você um(a) caminhoneiro(a).", pname);
- SendClientFormat(playerid, Azul, "Você setou o(a) %s um(a) caminhoneiro(a).", aname);
- Prof[id][Profissao] = Caminhoneiro;
- SetPlayerPos(playerid, 1380.579589, 1021.882324, 10.820312);
- SetPlayerColor(id, C_Caminhoneiro);
- return 1;
- }
- CMD:jetpack(playerid){ SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK); return 1; }
- CMD:caminhao(playerid)
- {
- SetPlayerPos(playerid, 1380.579589, 1021.882324, 10.820312);
- return 1;
- }
- stock PlayerToPoint(playerid, Float:radi, Float:x, Float:y, Float:z)
- {
- if(IsPlayerConnected(playerid))
- {
- new Float:oldposx, Float:oldposy, Float:oldposz;
- new Float:tempposx, Float:tempposy, Float:tempposz;
- GetPlayerPos(playerid, oldposx, oldposy, oldposz);
- tempposx = (oldposx -x);
- tempposy = (oldposy -y);
- tempposz = (oldposz -z);
- if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
- {
- return 1;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment