Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // cretids DuMBaSS
- ////Editado by
- //vegaltasendailadies
- #include <a_samp>
- new PlayerInJob[MAX_PLAYERS];
- new Constructor[MAX_PLAYERS];
- new Mescla[MAX_PLAYERS];
- new obrero1;
- new obrero2;
- new obrero3;
- new Oldskin2[MAX_PLAYERS];
- new carConstructor[2];
- #define COLOR_RED 0xAA3333AA
- #define COLOR_SYSTEM 0xEFEFF7AA
- #define COLOR_LIGHTBLUE 0x33CCFFAA
- #pragma tabsize 0
- forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
- public PlayerToPoint(Float:radi, playerid, 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;
- }
- public OnFilterScriptInit()
- {
- //los amdamios
- ///doety construccion job
- CreateObject(16317, -2045.42285, 250.05060, 33.69996, 0.00000, 0.00000, 105.12000);//grave y mescla
- CreateObject(11010, -2047.59314, 303.24390, 40.13972, 0.00000, 0.00000, 0.00000);
- CreateObject(9618, -2027.27527, 298.45770, 45.48360, 0.00000, 0.00000, 273.00000);
- CreateObject(9817, -2027.48059, 298.37659, 45.52235, 0.00000, 0.00000, -86.00000);
- ///casita
- CreateObject(9361, -2073.34326, 213.05653, 37.10638, 0.00000, 0.00000, 135.00000);
- CreateObject(15037, -2071.09814, 213.46312, 34.94680, 0.00000, 0.00000, 168.00000);
- CreateObject(1702, -2075.02783, 210.67334, 34.60570, 0.00000, 0.00000, 178.00000);
- CreateObject(2196, -2070.44556, 213.99489, 35.35581, 0.00000, 0.00000, 0.00000);
- CreateObject(2894, -2071.00391, 213.10210, 35.36160, 0.00000, 0.00000, 0.00000);
- CreateObject(2200, -2069.70093, 210.68997, 34.74070, 0.00000, 0.00000, 179.00000);
- CreateObject(2427, -2072.33569, 210.11861, 34.73150, 0.00000, 0.00000, 178.00000);
- CreateObject(1736, -2072.43555, 210.34270, 36.43350, 0.00000, 0.00000, 175.00000);
- CreateObject(1819, -2075.87964, 211.95470, 34.73410, 0.00000, 0.00000, 0.00000);
- CreateObject(1702, -2077.42334, 214.09639, 34.60570, 0.00000, 0.00000, 0.00000);
- CreateObject(2690, -2074.00488, 209.93336, 36.25890, 0.00000, 0.00000, 91.00000);
- CreateObject(3472, -2075.48340, 215.85941, 34.92170, 0.00000, 0.00000, 40.00000);
- ///tablas barrera y demas
- CreateObject(17050, -2028.33936, 302.11938, 29.95620, 0.00000, 0.00000, 280.00000);
- CreateObject(17050, -2017.46155, 303.11719, 34.00740, 0.00000, 0.00000, 280.00000);
- ///////
- obrero1 = CreatePickup(1239, 23, -2070.4971,211.5426,35.7314, -1);////te pones uniforme y empiezas
- obrero2 = CreatePickup(1239, 23, -2073.0662,210.3388,35.7314, -1);///tequitas uniforme
- obrero3 = CreatePickup(1239, 23, 2182.0974121094,-2252.8625488281,14.7734375, -1);///letrero de bienvenida en la entrada llegando a la obra
- Create3DTextLabel("[Aqui pides empleo y te pones uniforme",0x0000FFAA,-2073.0662,210.3388,35.7314,20.0,0, 1);
- Create3DTextLabel("[Entregas uniforme y recibir paga aqui",0x0000FFAA,-2070.4971,211.5426,35.7314,20.0,0, 1);
- Create3DTextLabel("Bienvenidos a obreros SA pasa a la oficina para pedir empleo",0x0000FFAA,-2035.3964,231.3907,35.0084,20.0,0, 1);
- carConstructor[0] = AddStaticVehicleEx(486, -2087.9299, 261.1356, 35.9089, 309.0000, -1, -1, 100);//borren ya que cualquiera puede suar
- carConstructor[1] = AddStaticVehicleEx(524, -2088.8799, 250.3840, 36.6111, 0.0000, -1, -1, 100);///estos dos vehiculos o agregen segun su gm
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- PlayerInJob[playerid] = 0;
- Mescla[playerid] = 0;
- Constructor[playerid] = 0;
- Oldskin2[playerid] = 0;
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- new animlib[32];
- new animname[32];
- if(Mescla[playerid] == 1 && !PlayerToPoint(2.0,playerid,-2048.0684,256.7028,35.6630)){///aca recojes la mescla
- GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,32,animname,32);
- if(strcmp(animname, "IDLE_STANCE", true) != 0 && strcmp(animname, "RUN_CIVI", true) != 0 && strcmp(animname, "WALK_CIVI", true) != 0 && strcmp(animname, "crry_prtial", true) != 0 && strcmp(animname, "SPRINT_PANIC", true) != 0 && strcmp(animname, "RUN_PLAYER", true) != 0 && strcmp(animname, "WALK_PLAYER", true) != 0 && strcmp(animname, "SPRINT_CIVI", true) != 0){
- Mescla[playerid] = 0;
- SendClientMessage(playerid, COLOR_RED, "Has tirado la mescla,Regresa donde la tomaste,se te desconto un 10%!");
- if(IsPlayerAttachedObjectSlotUsed(playerid,2)) RemovePlayerAttachedObject(playerid,2);///esto esta bien
- ApplyAnimation(playerid,"CARRY","crry_prtial",4.1,0,1,1,0,1);
- SetPlayerCheckpoint(playerid,-2048.0684,256.7028,35.6630,2.0);///aca el checkpint recojes mescla
- }
- }
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- if(pickupid == obrero1) {
- ShowPlayerDialog(playerid,102,DIALOG_STYLE_MSGBOX,"Quieres","Trabajar aqui?","Si","No");
- }
- if(pickupid == obrero2) {
- ShowPlayerDialog(playerid,103,DIALOG_STYLE_MSGBOX,"Terminas","El turno? Recibiras tu paga","Si","No");
- }
- if(pickupid == obrero3) {
- ShowPlayerDialog(playerid,104,DIALOG_STYLE_MSGBOX,"Aviso","1. Este trabajo consiste en\n2. Recojer mescla y\n3. Llevarla arriba de la obra\n4. Si se te cae uno bote de mescla\nTendras que ir por otro","Suerte","");
- }
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- new string[256];
- if(PlayerToPoint(2.0, playerid,-2048.0684,256.7028,35.6630))///igual recojes mesclas
- {
- Mescla[playerid] = 1;
- ApplyAnimation(playerid,"CARRY","crry_prtial",4.1,0,1,1,1,1);//revisado que esta bien
- SetPlayerAttachedObject(playerid, 2, 1329, 1,0.20,0.36,0.0,0.0,90.0, 0.0, 0.4, 0.3, 0.6);
- SetPlayerCheckpoint(playerid,-2019.7251,303.4937,54.9075,2.0);///aca entregas las mesclas
- } ////-2020.4305, 303.4898, 54.2458
- if(PlayerToPoint(2.0, playerid,-2019.7251,303.4937,54.9075))///entregas mesclas
- {
- Mescla[playerid] = 0;
- ///RemovePlayerAttachedObject(playerid,1);
- //ApplyAnimation(playerid,"CARRY","putdwn",4.1,0,1,1,1,1);/// falla algo de la animacion
- ApplyAnimation(playerid,"CARRY","putdwn",1,0,0,0,0,0);
- Constructor[playerid]++;
- if(IsPlayerAttachedObjectSlotUsed(playerid,2)) RemovePlayerAttachedObject(playerid,2);
- format(string, sizeof(string), "Entregaste la mescla ve por mas {A52A2A}%d",Constructor[playerid]);
- SendClientMessage(playerid, COLOR_SYSTEM, string);
- SetPlayerCheckpoint(playerid,-2048.0684,256.7028,35.6630,2.0);///recojes otra vez mas
- }
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == 103)
- {
- new string[128];
- if(response){
- if(!PlayerInJob[playerid]){
- SendClientMessage(playerid, COLOR_RED, "Terminaste la jornada");
- SendClientMessage(playerid, COLOR_RED, "Para volver a trabajar ve a ponerte el uniforme");
- return 1;
- }
- PlayerInJob[playerid] = 0;
- SetPlayerSkin(playerid, Oldskin2[playerid]);
- DisablePlayerCheckpoint(playerid);
- GivePlayerCash(playerid, Constructor[playerid]*50); //esto mdifiquen es el pago,tomen en cuenta que se les cae facil la mescla asi que un buen pago seria justo.
- format(string, sizeof(string), "{FFFAFA}Tu ganancia fue de {228B22}%d$ {FFFAFA}Ok? {A52A2A}%d {FFFAFA}Gracias por trabajar en esta empresa)",Constructor[playerid]*50,Constructor[playerid]);
- SendClientMessage(playerid, COLOR_SYSTEM, string);
- Constructor[playerid] = 0;
- }
- return 1;
- }
- if(dialogid == 102)
- {
- if(response){
- if(PlayerInJob[playerid]){
- SendClientMessage(playerid, COLOR_RED, "Ve afuera");
- SendClientMessage(playerid, COLOR_RED, "Ya eres empleado");
- return 1;
- }
- PlayerInJob[playerid] = 1;
- Oldskin2[playerid] = GetPlayerSkin(playerid);
- SetPlayerSkin(playerid, 260);
- SetPlayerCheckpoint(playerid,-2048.0684,256.7028,35.6630,2.0);////recojes mas xd
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ve por mesclas para empezar a trabajar");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ya tienes el uniforme y empleo ve afuera a trabajar");
- }
- return 1;
- }
- return 1;
- }
- //============[Stock]==========
- stock GivePlayerCash(playerid, money)
- {
- SetPVarInt(playerid, "Cash", GetPVarInt(playerid, "Cash")+money);
- GivePlayerMoney(playerid, money);
- return 1;
- }
- stock ResetPlayerCash(playerid)
- {
- SetPVarInt(playerid, "Cash", 0);
- return 1;
- }
- // (c)DuMBaSS All rights reserved
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement