--[[----------------------------------------------------------------------------------+ | ______ _ _ | | (_____ (_) | | | | _____) ) ____ _ _| | _____ | | | ____/ |/ ___) | | | |(____ | | | | | | | | | |_| | |/ ___ | | | |_| |_|_| |____/ \_)_____| | | ______ _ ______ | | (_____ \ | | / _____) | | _____) )_____| | _( (____ _____ ____ ____ | | | __ /(____ | |_/ )\____ \(____ | \| _ \ | | | | \ \/ ___ | _ ( _____) ) ___ | | | | |_| | | | |_| |_\_____|_| \_|______/\_____|_|_|_| __/ | | |_| | | __________.__ .__ .__ | | \______ \ | __ __ ____ |__| ____ | | __ _______ | | | ___/ | | | \/ ___\| |/ \ | | | | \__ \ | | | | | |_| | / /_/ > | | \ | |_| | // __ \_ | | |____| |____/____/\___ /|__|___| / /\ |____/____/(____ / | | /_____/ \/ \/ \/ | +-------------------------------------------------------------------------------------+ ___ ___ __ __ __ __ |\/| |__ | / \ | \ / \ /__` | | |___ | \__/ |__/ \__/ .__/ +---------------------------------------------------------------+ samp.log("texto") samp.alert("titulo","mensaje","boton1","boton2") boton2 es opcional y se puede dejar asi "" samp.input("titulo","mensaje","boton1","boton2") samp.list("titulo","mensaje","boton1","boton2") mensaje se separa con \n por cada elemento samp.exit() samp.send(string) samp.reconnect() samp.forcecrash() samp.dialogresponse((int)id,(int)boton (10 o 0), (int) elemento de lista (empieza desde 0), (string)"retorno" (si es lista escribir tambien el valor)) ejemplo para /stats samp.dialogresponse(5040,0,0,"") samp.settimer((int)timerid,(int)ms) samp.killtimer((int)timerid) samp.onfootpool(true/false) (para enviar o no el onfoot data) string = samp.getplayername((int)id) int = samp.getplayerid((string)"nombre_apellido") int = samp.getplayerping((int)id) igual que getplayerscore getplayerhealth getplayerarmour getplayerweapon getplayervecx /y /z -> esta informacion solo esta disponible si estmos cerca y este player se añade al mundo con onWorldAdd(playerid) bool = samp.isplayerconnected((int)id) int = samp.getplayerscount() samp.setname("nombre_apellido") samp.setpassword("pass") pw = samp.getpassword(); samp.setserver("xxxx.yyyyyy.zz") samp.setport(7777) samp.sethealth(100) samp.setarmour(0) samp.setwkeys(0) --4=fire samp.setposx(-2000.37) /y /z samp.spawn() samp.sleep() samp.selectclass((int)skinid) --ejecutar justo antes de spawn samp.entervehicle(vehid,passanger) passanger: conductor=0 pasajero=1 samp.exitvehicle(vehid) samp.incarpool(0/1) ___ ___ ___ __ __ |__ \ / |__ |\ | | / \ /__` |___ \/ |___ | \| | \__/ .__/ +---------------------------------------------------------------+ onInit((string)cmd) onPluginDialog((int)boton(10/0), (int) list_item (empieza de 0), (string)"texto") onInterceptCmd((string)cmd) intercepta texto enviado desde raksamp, debe retornar false, si retorna true se previene el envio. onPluginBtn() al pulsar el boton [plugins] onTimer((int)timerid) onRakError((int)errorid) lista de errorids: RAK_ERR_BANNED=31 RAK_ERR_SERVERCLOSEDCON=28 RAK_ERR_ATTEMPFAILED=25 RAK_ERR_SERVERFULL=27 RAK_ERR_INVALID_PASSWORD=32 RAK_ERR_CONNECTIONLOST=29 RAK_ERR_BAD_VERSION=1 RAK_ERR_BAD_NICKNAME=2 --EN USO, TIMEOUT... RAK_ERR_BAD_MOD=3 RAK_ERR_BAD_PLAYERID=4 onPlayerJoin((int)playerid, (string)name) onPlayerQuit((int)playerid, (string)name) onGameStart((int)myplayerid,(string)hostname, (string)myname) onWorldAdd((int)playerid, (string)name) onPlayerDeath((int)playerid, (string)name) onWorldRemove((int)playerid, (string)name) onVehicleAdd(id,modelo,posx,posy,posz) onVehicleRemove(id) onCmd((string)texto,(string)color) DEBE RETORNAR FALSE onChat((string)texto,(string)playername) onDialog((int)id,(int)tipo(0:msgbox 1:input 2:list), (string)titulo, (string)boton1, (string)boton2, (string)texto) debe retornar false, si retorna true no muestra el dialogo normal. onDlgResponse((int)id, (int)boton (10/0), (int) list_item (empieza de 0), (string) texto_o_elemento) onGametext((string)texto) onSpawn() onClassRequest((int)skinid) onConnecting((string)server,(int)port) onDisconnected(boolean timeout (0 leaving; 1 forcecrash)) onMarker(playerid,(string)playername,x,y,z) onMarkerEnter() onCheckpoint(x,y,z,radius) onEnterVehicle(playerid,vehicleid,seat) onExitVehicle(playerid,vehicleid) PASOS PARA COGER UN VEHICULO: coordenadas cerca; obtener vehiculos disponibles onVehicleAdd; ====================================================================================== ___ __ ___ __ __ _ _ __ ( ,\( ) ( ,)( ) / \( ) ) / \ ) _//__\ ) ,\ )(__( () )) \( () ) (_) (_)(_)(___/(____)\__/(_)\_)\__/ ___ __ ___ ___ _ _ ( ,) / \( ,)( _)( \/ ) ) \( () )) ,\ ) _) ) ( (_)\_)\__/(___/(___)(_/\_) =====================================================================================]]-- require( "iuplua" ) require( "iupluaweb" ) RAK_ERR_BANNED=31 RAK_ERR_SERVERCLOSEDCON=28 RAK_ERR_ATTEMPFAILED=25 RAK_ERR_SERVERFULL=27 RAK_ERR_INVALID_PASSWORD=32 RAK_ERR_CONNECTIONLOST=29 RAK_ERR_BAD_VERSION=1 RAK_ERR_BAD_NICKNAME=2 --EN USO, TIMEOUT... RAK_ERR_BAD_MOD=3 RAK_ERR_BAD_PLAYERID=4 INITARGUMENTS="" INJAIL=false; INTERCEPT_STATS_DLG=false; MYNAME="" MYID=0 TIMERCOUNTER = 0 JOBTIMER=0 TPMATTIMER=0 WITHDRAW=0 BUY24=0 BUY24_ = 0 ISVENDEDORAMBULANTE = false; ISBUYING = false; HASACCEPTEDSELL = false; GETPIZZABIKE = false; GETPIZZABIKETIMER = 0; TIMER_VENDEDOR_AMBULANTE=200 TIMER_REGISTRO_CUENTAS=201 BOTON1=10 BOTON2=0 ARMSLVLUP = 0 DETLVLUP = 0 SELLGUNTIMER = 0 SETARMSDEALER = 0 SCREWDRIVERSELL = 0 PIZZAID = 0 ISINCAR = false; TPPIZZATIMER = 0; CHECKCOORDSX = 0; CHECKCOORDSY = 0; CHECKCOORDSZ = 0; ISPIZZAMATRUNNING = false; PAYCHECKRELOG = false; MATCREATE = 0; ISMATCREATE = false; EXITTIMER = 0; CHANGEVW = 0; ISMONEYFARM = false; PANICMODE = true; averno={ {-301.44, 2269.68, 66.84}, {-1017, 1793, 35.79}, {-1268.91, 2062.41, 40.55}, {-1294.20, 2180.36, 58.68}, {-1134.00, 2232.59, 68.11}, {-540.11, 1796.72, 95.00}, {-720.11, 1560.27, 42.72}, {-742.06, 2046.79, 22.09}, {-660.50, 2382.05, 88.72}, {-444.56, 2347.02, 76.94}, } function onPluginBtn() --samp.settimer(99999, 900) btn_relogPaycheck=iup.button{title="Relog on paycheck", padding="3x0"} function btn_relogPaycheck:action() PAYCHECKRELOG = true samp.log('You now relog every paycheck') end btn_noRelogPaycheck=iup.button{title="Stop paycheckRelog", padding="3x0"} function btn_noRelogPaycheck:action() PAYCHECKRELOG = false samp.log('You dont relog every paycheck anymore') end btn_reconnect=iup.button{title="Reconnect", padding="3x0"} function btn_reconnect:action() samp.reconnect() samp.log('You have reconnected') end btn_tpPershing=iup.button{title="Pershing Square", padding="3x0"} function btn_tpPershing:action() samp.log('You have teleported to Pershing square') end btn_tpPier=iup.button{title="Pier 69", padding="3x0"} function btn_tpPier:action() samp.selectclass(255); samp.spawn(); randomcoord = math.random(1, 10); samp.setposx(averno[randomcoord][1]) samp.setposy(averno[randomcoord][2]) samp.setposz(averno[randomcoord][3]) samp.onfootpool(1); samp.log('You have teleported to Pier 69') end btn_armsDealer=iup.button{title="Arms dealer", padding="3x0"} function btn_armsDealer:action() samp.setposx(1366.43) samp.setposy(-1275.20) samp.setposz(11.54) acceptJob() samp.log('Youre now arms dealer') end btn_detective=iup.button{title="Detective", padding="3x0"} function btn_detective:action() samp.setposx(251.99) samp.setposy(117.36) samp.setposz(1001.22) acceptJob() samp.log('Youre now detective') end btn_lawyer=iup.button{title="Lawyer", padding="3x0"} function btn_lawyer:action() samp.setposx(1380.89) samp.setposy(-1088.68) samp.setposz(25.38) acceptJob() samp.log('Youre now lawyer') end btn_bodyguard=iup.button{title="Bodyguard", padding="3x0"} function btn_bodyguard:action() samp.setposx(1224.13) samp.setposy(267.98) samp.setposz(17.55) acceptJob() samp.log('Youre now bodyguard') end btn_mechanic=iup.button{title="Mechanic", padding="3x0"} function btn_mechanic:action() samp.setposx(-2032.60) samp.setposy(143.86) samp.setposz(26.83) acceptJob() samp.log('Youre now mechanic') end btn_trucker=iup.button{title="Trucker", padding="3x0"} function btn_trucker:action() samp.setposx(-1560) samp.setposy(127.49) samp.setposz(1.55) acceptJob() samp.log('Youre now trucker') end btn_craftsman=iup.button{title="Craftsman", padding="3x0"} function btn_craftsman:action() samp.setposx(2195.83) samp.setposy(-1973.06) samp.setposz(11.55) acceptJob() samp.log('Youre now craftsman') end btn_pizzaboy=iup.button{title="Pizzaboy", padding="3x0"} function btn_pizzaboy:action() samp.setposx(-1720.96) samp.setposy(1364.45) samp.setposz(5.18) acceptJob() samp.log('Youre now pizzaboy') end btn_armsLvl=iup.button{title="Arms dealer level up", padding="3x0"} function btn_armsLvl:action() samp.settimer(500, 13000) samp.log("Leveling up arms dealer"); end btn_detectiveLvl=iup.button{title="Detective level up", padding="3x0"} function btn_detectiveLvl:action() samp.settimer(501, 13000) samp.log("Leveling up detective"); end btn_tpMatrun=iup.button{title="TP matrun", padding="3x0"} function btn_tpMatrun:action() samp.settimer(5022, 1000) samp.log("TP Matrunning"); end btn_stopTpMatrun=iup.button{title="Stop TP matrun", padding="3x0"} function btn_stopTpMatrun:action() samp.killtimer(502) samp.settimer(5023, 1000) samp.log("Stopped TP Matrunning"); end btn_armsLvlStop=iup.button{title="Stop", padding="3x0"} function btn_armsLvlStop:action() samp.killtimer(500) samp.log("Stopped leveling arms dealer"); ARMSLVLUP = 0; end btn_detLvlStop=iup.button{title="Stop", padding="3x0"} function btn_detLvlStop:action() samp.killtimer(501) samp.log("Stopped leveling detective"); DETLVLUP = 0; end btn_withdraw=iup.button{title="Withdraw all cash", padding="3x0"} function btn_withdraw:action() samp.settimer(600, 1000) end btn_tpAverno=iup.button{title="Random spawn", padding="3x0"} function btn_tpAverno:action() randomcoord = math.random(1, 10); samp.setposx(averno[randomcoord][1]) samp.setposy(averno[randomcoord][2]) samp.setposz(averno[randomcoord][3]) samp.log("Ahora estas en el desierto LV"); end btn_24buyMenu=iup.button{title="24/7 buy", padding="3x0"} function btn_24buyMenu:action() samp.settimer(601, 300) samp.log("24/7 menu opened"); end btn_armasAmbulante=iup.button{title="Vendedor ambulante", padding="3x0"} function btn_armasAmbulante:action() ISVENDEDORAMBULANTE = true samp.log("Ahora eres un vendedor ambulante"); end btn_stopArmas=iup.button{title="Stop vendedor", padding="3x0"} function btn_stopArmas:action() ISVENDEDORAMBULANTE = false samp.log("Ya no eres un vendedor ambulante"); end btn_screwdriver=iup.button{title="Screwdriver", padding="3x0"} function btn_screwdriver:action() samp.settimer(801, 200) samp.log("Screwdriver bought"); end btn_cogerMoto=iup.button{title="Get pizzabike", padding="3x0"} function btn_cogerMoto:action() samp.setposx(-1714.04) samp.setposy(1349.59) samp.setposz(4.82) GETPIZZABIKE = true; samp.log("You are in a pizza bike"); end btn_tpPizza=iup.button{title="TP Pizza", padding="3x0"} function btn_tpPizza:action() ISPIZZAMATRUNNING = true; samp.settimer(1000, 100) samp.log("You are now pizza running"); end btn_stopTpPizza=iup.button{title="Stop TP Pizza", padding="3x0"} function btn_stopTpPizza:action() ISPIZZAMATRUNNING = false; samp.killtimer(1000) samp.log("Stopped pizza running"); end btn_dejarMoto=iup.button{title="Drop pizzabike", padding="3x0"} function btn_dejarMoto:action() samp.exitvehicle(PIZZAID) samp.incarpool(0) samp.onfootpool(1) randomcoord = math.random(1, 10); samp.setposx(averno[randomcoord][1]) samp.setposy(averno[randomcoord][2]) samp.setposz(averno[randomcoord][3]) samp.log("Te has bajado de la moto"); end btn_cogerTruck=iup.button{title="Get truck", padding="3x0"} function btn_cogerTruck:action() samp.log("Ahora eres un vendedor de armas ambulante"); end btn_dejarTruck=iup.button{title="Drop truck", padding="3x0"} function btn_dejarTruck:action() samp.log("Ahora eres un vendedor de armas ambulante"); end btn_tpTruck=iup.button{title="TP truck", padding="3x0"} function btn_tpTruck:action() samp.log("Ahora eres un vendedor de armas ambulante"); end btn_stopTpTruck=iup.button{title="Stop TP truck", padding="3x0"} function btn_stopTpTruck:action() samp.log("Ahora eres un vendedor de armas ambulante"); end btn_vw1=iup.button{title="Set VW 1", padding="3x0"} function btn_vw1:action() samp.settimer(5024, 1000) samp.log("Ahora estas en VW 1"); end btn_vw0=iup.button{title="Set VW 0", padding="3x0"} function btn_vw0:action() samp.settimer(5023, 1000) samp.log("Ahora estas en VW 0"); end btn_actPanic=iup.button{title="Activate Panic mode", padding="3x0"} function btn_actPanic:action() PANICMODE = true end btn_deacPanic=iup.button{title="Deactivate Panic mode", padding="3x0"} function btn_deacPanic:action() PANICMODE = false end browser = iup.webbrowser{value="http://www.amsspecialist.com/gta/map.html"} function browser:navigate_cb(url) --iup.Message('',url) if(string.find(url,'#')) then url=url:sub((url:find('#')+1)) mapx=url:sub(0,url:find('_')-1) mapy=url:sub((url:find('_')+1)) --iup.Message('',tostring(mapx).." @ "..tostring(mapy)) samp.setposx(mapx) samp.setposy(mapy) samp.setposz(-15) end end vboxA = iup.vbox{btn_relogPaycheck, btn_noRelogPaycheck, btn_reconnect, btn_vw1, btn_vw0, btn_24buyMenu, btn_screwdriver, btn_actPanic, btn_deacPanic, gap=20, iup.label{expand="HORIZONTAL"}} vboxA_ = iup.vbox{btn_withdraw, gap = 20} vboxB = iup.vbox{btn_tpPershing, btn_tpPier, btn_tpAverno, gap=20} vboxB_ = iup.vbox{btn_tpMatrun, btn_stopTpMatrun, btn_armasAmbulante, btn_stopArmas, btn_cogerMoto, btn_dejarMoto, btn_tpPizza, btn_stopTpPizza, gap=20} vboxB2 = iup.vbox{btn_cogerTruck, btn_dejarTruck, btn_tpTruck, btn_stopTpTruck, gap=20} vboxC2 = iup.vbox{btn_armsLvlStop, btn_detLvlStop, gap = 20} vboxC_ = iup.vbox{btn_armsLvl, btn_detectiveLvl, gap = 20} vboxC = iup.vbox{btn_armsDealer, btn_detective, btn_lawyer, btn_bodyguard, btn_mechanic, btn_trucker, btn_craftsman, btn_pizzaboy, gap=20} vboxD = iup.vbox{browser} hboxA = iup.hbox{vboxC, vboxC_, vboxC2} hboxB = iup.hbox{vboxB, vboxB_, vboxB2} hboxC = iup.hbox{vboxA, vboxA_} hboxC.tabtitle = "Creacion de cuentas" hboxB.tabtitle = "Teleports" hboxA.tabtitle = "Trabajos" vboxD.tabtitle = "Tp MAP" tabs = iup.tabs{hboxC, hboxB, hboxA, vboxD} dlg = iup.dialog{iup.vbox{tabs; margin="10x10"}; title="Plugin List", size="330x300"} dlg:showxy(iup.CENTER, iup.CENTER) if (iup.MainLoopLevel()==0) then iup.MainLoop() end --GET PARAMETER-- --[[res, name = iup.GetParam("Title", nil, "Give your name: %s\n","") iup.Message("Hello!",name)]]-- end function onInit(cmd) --SE EJECUTA AL INICIO-- --iup.Message(cmd); INITARGUMENTS = cmd; if (INITARGUMENTS=="2") then --unjail end if (INITARGUMENTS=="1") then --modo crear cuentas end if (INITARGUMENTS=="3") then ISMATCREATE = true; end if (INITARGUMENTS=="4") then ISMONEYFARM = true; end end function onInterceptCmd(text) if (text:find('!lua')) then lua_dostring(text:sub(5)); return true; end return false end function onGametext(texto) if (string.find(texto,'Jail Time Left') and INITARGUMENTS == "2") then INJAIL = true; else INJAIL = false; end if (string.find(texto, 'CONVERSATION_YES')) then samp.onfootpool(0) samp.settimer(100, 1200) end if (string.find(texto, 'Paycheck') and PAYCHECKRELOG == true) then samp.reconnect() end end --currrpc=25 function onTimer(timerid) --[[if (timerid==99999) then samp.drunk(currrpc) samp.log("Triying RPC "..currrpc) currrpc=currrpc+1 end]] if (timerid == 1100) then EXITTIMER = EXITTIMER + 1; if (EXITTIMER == 1) then samp.setposx(-31.31); samp.setposy(-91.69); samp.setposz(1003.55); end if (EXITTIMER == 2) then samp.send("/exit"); end if (EXITTIMER == 2) then randomcoord = math.random(1, 10); samp.setposx(averno[randomcoord][1]) samp.setposy(averno[randomcoord][2]) samp.setposz(averno[randomcoord][3]) samp.killtimer(1100); EXITTIMER = 0 samp.exit() end end if (timerid == 1200) then EXITTIMER = EXITTIMER + 1; if (EXITTIMER == 1) then samp.setposx(-1403.79); samp.setposy(-253.93); samp.setposz(1043.60); end if (EXITTIMER == 2) then samp.send("/exit"); end if (EXITTIMER == 2) then randomcoord = math.random(1, 10); samp.setposx(averno[randomcoord][1]) samp.setposy(averno[randomcoord][2]) samp.setposz(averno[randomcoord][3]) samp.killtimer(1200); EXITTIMER = 0 end end if (timerid == 1000) then TPPIZZATIMER = TPPIZZATIMER + 1; if (TPPIZZATIMER == 1) then samp.setposx(-1714.04) samp.setposy(1349.59) samp.setposz(4.82) end if (TPPIZZATIMER == 2) then samp.send("/getpizza"); end if (TPPIZZATIMER == 2) then randomcoord = math.random(1, 10); samp.setposx(averno[randomcoord][1]) samp.setposy(averno[randomcoord][2]) samp.setposz(averno[randomcoord][3]) samp.killtimer(1000); end if (TPPIZZATIMER == 3) then samp.setposx(CHECKCOORDSX); samp.setposy(CHECKCOORDSY); samp.setposz(CHECKCOORDSZ-2); TPPIZZATIMER = 0; samp.settimer(1000, 1000) end end if (timerid == 900) then GETPIZZABIKETIMER = GETPIZZABIKETIMER + 1; if (GETPIZZABIKETIMER == 1) then samp.entervehicle(PIZZAID, 0); end if (GETPIZZABIKETIMER == 2) then samp.onfootpool(0); samp.incarpool(1); end if (GETPIZZABIKETIMER == 3 and ISMONEYFARM == true) then samp.onfootpool(0); samp.incarpool(1); GETPIZZABIKETIMER = 0 ISPIZZAMATRUNNING = true; samp.settimer(1000, 100) samp.killtimer(900) else if (GETPIZZABIKETIMER == 3) then GETPIZZABIKETIMER = 0 samp.killtimer(900) end end end if (timerid == 800) then if (HASACCEPTEDSELL == false) then randomcoord = math.random(1, 10); samp.setposx(averno[randomcoord][1]) samp.setposy(averno[randomcoord][2]) samp.setposz(averno[randomcoord][3]) samp.settimer(706, 200) samp.killtimer(800) end end if (timerid == 801) then SCREWDRIVERSELL = SCREWDRIVERSELL + 1; if (SCREWDRIVERSELL == 1) then samp.setposx(2195.83) samp.setposy(-1973.06) samp.setposz(11.55) end if (SCREWDRIVERSELL == 2) then samp.send("/quitjob") samp.settimer(801, 700) end if (SCREWDRIVERSELL == 3) then samp.send("/join") end if (SCREWDRIVERSELL == 4) then samp.send("/accept job") samp.settimer(801, 300) end if (SCREWDRIVERSELL == 5) then randomcoord = math.random(1, 10); samp.setposx(averno[randomcoord][1]) samp.setposy(averno[randomcoord][2]) samp.setposz(averno[randomcoord][3]) end if (SCREWDRIVERSELL == 6) then samp.send("/craft "..MYNAME.." screwdriver") end if (SCREWDRIVERSELL == 7) then samp.setposx(1366.43) samp.setposy(-1275.20) samp.setposz(11.54) samp.settimer(801, 500) end if (SCREWDRIVERSELL == 8) then samp.send("/quitjob") end if (SCREWDRIVERSELL == 9) then samp.send("/join") end if (SCREWDRIVERSELL == 10) then samp.send("/accept job") samp.settimer(801, 400) end if (SCREWDRIVERSELL == 11) then randomcoord = math.random(1, 10); samp.setposx(averno[randomcoord][1]) samp.setposy(averno[randomcoord][2]) samp.setposz(averno[randomcoord][3]) samp.killtimer(801) SCREWDRIVERSELL = 0 if (ISMATCREATE == true) then samp.settimer(1100, 1000); end end end if (timerid == 700) then SELLGUNTIMER = SELLGUNTIMER + 1; if (SELLGUNTIMER == 1) then sendToAmbulante() end if (SELLGUNTIMER == 2) then samp.send("/sellgun "..nameArms.." shotgun") samp.settimer(800, 10000) SELLGUNTIMER = 0; samp.killtimer(700) end end if (timerid == 701) then SELLGUNTIMER = SELLGUNTIMER + 1; if (SELLGUNTIMER == 1) then sendToAmbulante() end if (SELLGUNTIMER == 2) then samp.send("/sellgun "..nameArms.." mp5") samp.settimer(800, 10000) SELLGUNTIMER = 0; samp.killtimer(701) end end if (timerid == 702) then SELLGUNTIMER = SELLGUNTIMER + 1; if (SELLGUNTIMER == 1) then sendToAmbulante() end if (SELLGUNTIMER == 2) then samp.send("/sellgun "..nameArms.." deagle") samp.settimer(800, 10000) SELLGUNTIMER = 0; samp.killtimer(702) end end if (timerid == 703) then --mats SELLGUNTIMER = SELLGUNTIMER + 1; if (SELLGUNTIMER == 1) then sendToAmbulante() end if (SELLGUNTIMER == 2) then samp.send("/give "..nameArms.." materials 1000") end if (SELLGUNTIMER == 3) then randomcoord = math.random(1, 10); samp.setposx(averno[randomcoord][1]) samp.setposy(averno[randomcoord][2]) samp.setposz(averno[randomcoord][3]) SELLGUNTIMER = 0; samp.killtimer(703) end end if (timerid == 704) then --screwdriver SELLGUNTIMER = SELLGUNTIMER + 1; if (SELLGUNTIMER == 1) then samp.setposx(2195.83) samp.setposy(-1973.06) samp.setposz(11.55) end if (SELLGUNTIMER == 2) then samp.send("/quitjob") samp.settimer(704, 100) end if (SELLGUNTIMER == 3) then samp.send("/join") end if (SELLGUNTIMER == 4) then samp.send("/accept job") samp.settimer(704, 200) end if (SELLGUNTIMER == 5) then sendToAmbulante() end if (SELLGUNTIMER == 6) then samp.send("/craft "..nameArms.." screwdriver") samp.settimer(800, 10000) SELLGUNTIMER=0 samp.killtimer(704) end end if (timerid == 705) then --guard SELLGUNTIMER = SELLGUNTIMER + 1; if (SELLGUNTIMER == 1) then samp.setposx(1224.13) samp.setposy(267.98) samp.setposz(17.55) end if (SELLGUNTIMER == 2) then samp.send("/quitjob") samp.settimer(705, 100) end if (SELLGUNTIMER == 3) then samp.send("/join") end if (SELLGUNTIMER == 4) then samp.send("/accept job") samp.settimer(705, 200) end if (SELLGUNTIMER == 5) then sendToAmbulante() end if (SELLGUNTIMER == 6) then samp.send("/guard "..nameArms.." 2000") samp.settimer(800, 10000) SELLGUNTIMER=0 samp.killtimer(705) end end if (timerid == 706) then SETARMSDEALER = SETARMSDEALER + 1; if (SETARMSDEALER == 1) then samp.setposx(1366.43) samp.setposy(-1275.20) samp.setposz(11.54) end if (SETARMSDEALER == 2) then samp.send("/quitjob") samp.settimer(706, 100) end if (SETARMSDEALER == 3) then samp.send("/join") end if (SETARMSDEALER == 4) then samp.send("/accept job") samp.settimer(706, 200) end if (SETARMSDEALER == 5) then randomcoord = math.random(1, 10); samp.setposx(averno[randomcoord][1]) samp.setposy(averno[randomcoord][2]) samp.setposz(averno[randomcoord][3]) samp.killtimer(706) SETARMSDEALER = 0 end end if (timerid == 707) then --dinero fisico SELLGUNTIMER = SELLGUNTIMER + 1; if (SELLGUNTIMER == 1) then sendToAmbulante() end if (SELLGUNTIMER == 2) then samp.send("/pay "..nameArms.." 10000") end if (SELLGUNTIMER == 3) then randomcoord = math.random(1, 10); samp.setposx(averno[randomcoord][1]) samp.setposy(averno[randomcoord][2]) samp.setposz(averno[randomcoord][3]) SELLGUNTIMER = 0; samp.killtimer(707) end end if (timerid == 600) then WITHDRAW = WITHDRAW + 1; if (WITHDRAW == 1) then samp.setposx(2308.73) samp.setposy(-11.01) samp.setposz(26.74) end if (WITHDRAW == 2) then samp.send("/withdraw") WITHDRAW = 0; samp.killtimer(600); end end if (timerid == 601) then BUY24 = BUY24 + 1; if(BUY24 == 1) then samp.setposx(1144.83); samp.setposy(-1523.23); samp.setposz(15.80); end if (BUY24 == 2) then samp.send("/enter") end if (BUY24 == 3) then samp.setposx(-31.31); samp.setposy(-91.69); samp.setposz(1003.55); end if (BUY24 == 4) then samp.send("/buy") ISBUYING = true; samp.killtimer(601); BUY24 = 0 end end if (timerid == 602) then BUY24_ = BUY24_ + 1; if (BUY24_ == 1) then samp.send("/exit") end if (BUY24_ == 2) then randomcoord = math.random(1, 10); samp.setposx(averno[randomcoord][1]) samp.setposy(averno[randomcoord][2]) samp.setposz(averno[randomcoord][3]) ISBUYING = false; end end if (timerid == 500) then ARMSLVLUP = ARMSLVLUP + 1; samp.send("/sellgun "..MYNAME.." sdpistol") if (ARMSLVLUP > 50) then samp.killtimer(500) ARMSLVLUP = 0; end end if (timerid == 501) then DETLVLUP = DETLVLUP + 1; samp.send("/find 0") if (DETLVLUP > 250) then samp.killtimer(501) DETLVLUP = 0; end end if (timerid == 502) then TPMATTIMER = TPMATTIMER + 1; if (TPMATTIMER == 1) then samp.setposx(-1872.77); samp.setposy(1416.31); samp.setposz(5.43); samp.settimer(502, 500) end if (TPMATTIMER == 2) then samp.setposx(-1816.46); samp.setposy(-179.64); samp.setposz(7.41); end if (TPMATTIMER == 3) then samp.send("/getmats") randomcoord = math.random(1, 10); samp.setposx(averno[randomcoord][1]) samp.setposy(averno[randomcoord][2]) samp.setposz(averno[randomcoord][3]) TPMATTIMER = 0; samp.settimer(502, 15000) end end if (timerid == 5022) then CHANGEVW = CHANGEVW + 1; if(CHANGEVW == 1) then samp.setposx(1144.83); samp.setposy(-1523.23); samp.setposz(15.80); end if (CHANGEVW == 2) then samp.send("/enter") end if (CHANGEVW == 3) then CHANGEVW = 0 samp.settimer(502, 1000) samp.killtimer(5022) end end if (timerid == 5024) then CHANGEVW = CHANGEVW + 1; if(CHANGEVW == 1) then samp.setposx(1144.83); samp.setposy(-1523.23); samp.setposz(15.80); end if (CHANGEVW == 2) then samp.send("/enter") end if (CHANGEVW == 3) then CHANGEVW = 0 randomcoord = math.random(1, 10); samp.setposx(averno[randomcoord][1]) samp.setposy(averno[randomcoord][2]) samp.setposz(averno[randomcoord][3]) samp.killtimer(5024); end end if (timerid == 5023) then CHANGEVW = CHANGEVW + 1; if(CHANGEVW == 1) then samp.setposx(-31.31); samp.setposy(-91.69); samp.setposz(1003.55); end if (CHANGEVW == 2) then samp.send("/exit") end if (CHANGEVW == 3 and INITARGUMENTS == "1") then samp.setposx(1066.13); samp.setposy(-1496.34); samp.setposz(22.76); samp.sethealth(100); samp.sleep(500); samp.onfootpool(0); CHANGEVW = 0 samp.killtimer(5023); samp.exit() else if (CHANGEVW == 3) then randomcoord = math.random(1, 10); samp.setposx(averno[randomcoord][1]) samp.setposy(averno[randomcoord][2]) samp.setposz(averno[randomcoord][3]) CHANGEVW = 0 samp.killtimer(5023); end end end if (timerid == 503) then MATCREATE=MATCREATE+1; if (MATCREATE==1) then end if (MATCREATE==2) then samp.setposx(1366.43) samp.setposy(-1275.20) samp.setposz(11.54) end if (MATCREATE==3) then samp.send("/quitjob") end if (MATCREATE==4) then samp.send("/join") end if (MATCREATE==5) then samp.send("/accept job") end if (MATCREATE == 6) then samp.setposx(2308.73) samp.setposy(-11.01) samp.setposz(26.74) end if (MATCREATE == 7) then samp.send("/withdraw") end if (MATCREATE == 8) then samp.settimer(502, 200) MATCREATE = 0; samp.killtimer(503) end end if (timerid==400) then JOBTIMER=JOBTIMER+1; if (JOBTIMER==1) then samp.send("/quitjob") end if (JOBTIMER==2) then samp.send("/join") end if (JOBTIMER==3) then samp.send("/accept job") end if (JOBTIMER==4) then if (ISMONEYFARM == true) then samp.killtimer(400) samp.setposx(-1714.04) samp.setposy(1349.59) samp.setposz(4.82) GETPIZZABIKE = true; else randomcoord = math.random(1, 10); samp.setposx(averno[randomcoord][1]) samp.setposy(averno[randomcoord][2]) samp.setposz(averno[randomcoord][3]) JOBTIMER=0 samp.killtimer(400) end end end if (timerid == 100) then samp.send("/next"); end if (timerid == 201 and TIMERCOUNTER < 5) then samp.onfootpool(1) if (TIMERCOUNTER==2 or TIMERCOUNTER==4) then samp.setwkeys(0); else samp.setwkeys(4); end TIMERCOUNTER = TIMERCOUNTER + 1; if (TIMERCOUNTER==5) then samp.killtimer(201); samp.log("Tutorial realizado con exito.") if (INITARGUMENTS == "1") then samp.settimer(601, 400) end if (ISMATCREATE == true) then samp.settimer(601, 1000) end if (ISMONEYFARM == true) then samp.setposx(-1720.96) samp.setposy(1364.45) samp.setposz(5.18) acceptJob() end TIMERCOUNTER = 0; end end if (timerid == 300) then samp.send("/nextpaycheck"); if (INITARGUMENTS == "2") then samp.send("/time"); INTERCEPT_STATS_DLG=true; samp.send("/stats"); end if (INITARGUMENTS == "1") then INTERCEPT_STATS_DLG=true; samp.send("/stats"); end samp.settimer(300,math.random(170000,190000)); end end function onChat(texto, username) --TEXTO DE CHAT-- return false; end function onCmd (cmd, color) if (string.find(cmd, 'SERVER: Welcome')) then samp.selectclass(255); samp.spawn(); randomcoord = math.random(1, 10); samp.setposx(averno[randomcoord][1]) samp.setposy(averno[randomcoord][2]) samp.setposz(averno[randomcoord][3]) samp.onfootpool(1); samp.settimer(300, 180000); if (INITARGUMENTS == "2") then samp.log("SACANDO CUENTA DE LA JAIL") INJAIL=true; end if (INITARGUMENTS == "1") then samp.log("CREANDO CUENTA CON 2 HORAS") end if (INITARGUMENTS == "3") then samp.log("MATS LULULU RIKEZAS SOSIO") end end if (string.find(cmd, 'command outside the tutorial')) then samp.killtimer(100) samp.settimer(201, 500) end if (string.find(cmd, 'afford the')) then if (ISMATCREATE == true) then samp.settimer(801, 200) else samp.killtimer(502) randomcoord = math.random(1, 10); samp.setposx(averno[randomcoord][1]) samp.setposy(averno[randomcoord][2]) samp.setposz(averno[randomcoord][3]) TPMATTIMER = 0; end end if (string.find(cmd, 'in your account.')) then wealth="" wealth=cmd:sub(cmd:find('You have')+10); wealth=wealth:sub(0,wealth:find('in your account')-2); samp.send("/withdraw "..wealth) end if (string.find(cmd, 'SMS: shotgun pls') and ISVENDEDORAMBULANTE) then nameArms="" nameArms=cmd:sub(cmd:find('Sender: ')+8) nameArms=nameArms:sub(0, nameArms:find('(', nil, true)-2) nameArms=nameArms:gsub(' ', '_') samp.settimer(700, 200) end if (string.find(cmd, 'mp5 pls') and ISVENDEDORAMBULANTE) then nameArms="" nameArms=cmd:sub(cmd:find('Sender: ')+8) nameArms=nameArms:sub(0, nameArms:find('(', nil, true)-2) nameArms=nameArms:gsub(' ', '_') samp.settimer(701, 200) end if (string.find(cmd, 'deagle pls') and ISVENDEDORAMBULANTE) then nameArms="" nameArms=cmd:sub(cmd:find('Sender: ')+8) nameArms=nameArms:sub(0, nameArms:find('(', nil, true)-2) nameArms=nameArms:gsub(' ', '_') samp.settimer(702, 200) end if (string.find(cmd, 'mats pls') and ISVENDEDORAMBULANTE) then nameArms="" nameArms=cmd:sub(cmd:find('Sender: ')+8) nameArms=nameArms:sub(0, nameArms:find('(', nil, true)-2) nameArms=nameArms:gsub(' ', '_') samp.settimer(703, 200) end if (string.find(cmd, 'screwdriver pls') and ISVENDEDORAMBULANTE) then nameArms="" nameArms=cmd:sub(cmd:find('Sender: ')+8) nameArms=nameArms:sub(0, nameArms:find('(', nil, true)-2) nameArms=nameArms:gsub(' ', '_') samp.settimer(704, 200) end if (string.find(cmd, 'guard pls') and ISVENDEDORAMBULANTE) then nameArms="" nameArms=cmd:sub(cmd:find('Sender: ')+8) nameArms=nameArms:sub(0, nameArms:find('(', nil, true)-2) nameArms=nameArms:gsub(' ', '_') samp.settimer(705, 200) end if (string.find(cmd, 'euros fisicos') and ISVENDEDORAMBULANTE) then nameArms="" nameArms=cmd:sub(cmd:find('Sender: ')+8) nameArms=nameArms:sub(0, nameArms:find('(', nil, true)-2) nameArms=nameArms:gsub(' ', '_') samp.settimer(707, 200) end if (string.find(cmd, 'close pls') and ISVENDEDORAMBULANTE) then samp.exit(); end if (string.find(cmd, 'ambulante')) then ISVENDEDORAMBULANTE = true; end if (string.find(cmd, 'largo de aqui')) then randomcoord = math.random(1, 10); samp.setposx(averno[randomcoord][1]) samp.setposy(averno[randomcoord][2]) samp.setposz(averno[randomcoord][3]) end if (string.find(cmd, 'vw 0') and ISVENDEDORAMBULANTE) then samp.settimer(5023, 1000) end if (string.find(cmd, 'vw 1') and ISVENDEDORAMBULANTE) then samp.settimer(5024, 1000) end if (string.find(cmd, 'You have given') and string.find(cmd, 'a Shotgun') and ISVENDEDORAMBULANTE) then randomcoord = math.random(1, 10); samp.setposx(averno[randomcoord][1]) samp.setposy(averno[randomcoord][2]) samp.setposz(averno[randomcoord][3]) HASACCEPTEDSELL = true; end if (string.find(cmd, 'You have given') and string.find(cmd, 'a Deagle') and ISVENDEDORAMBULANTE) then randomcoord = math.random(1, 10); samp.setposx(averno[randomcoord][1]) samp.setposy(averno[randomcoord][2]) samp.setposz(averno[randomcoord][3]) HASACCEPTEDSELL = true; end if (string.find(cmd, 'You have given')and string.find(cmd, 'a Mp5') and ISVENDEDORAMBULANTE) then randomcoord = math.random(1, 10); samp.setposx(averno[randomcoord][1]) samp.setposy(averno[randomcoord][2]) samp.setposz(averno[randomcoord][3]) HASACCEPTEDSELL = true; end if (string.find(cmd, 'You have given') and string.find(cmd, 'a screwdriver') and ISVENDEDORAMBULANTE) then samp.settimer(706, 200) HASACCEPTEDSELL = true; end if (string.find(cmd, 'accepted your protection') and ISVENDEDORAMBULANTE) then samp.settimer(706, 400) HASACCEPTEDSELL = true; end if (string.find(cmd, 'You need to be driving a pizzaboy found')) then randomcoord = math.random(1, 10); samp.setposx(averno[randomcoord][1]) samp.setposy(averno[randomcoord][2]) samp.setposz(averno[randomcoord][3]) end if (string.find(cmd, 'You have picked up a pizza for') and string.find(cmd, 'seconds to deliver')) then pizzaSeconds="" pizzaSeconds=cmd:sub(-35) pizzaSeconds=pizzaSeconds:sub(pizzaSeconds:find('You have')+9) pizzaSeconds=pizzaSeconds:sub(0, pizzaSeconds:find('seconds')-2) pizzaSeconds=((tonumber(pizzaSeconds)*10/80)+5)*1000 --samp.log(tostring(pizzaSeconds)) samp.settimer(1000, pizzaSeconds) end if (string.find(cmd, 'Your IP is banned')) then samp.log("[PANIC MODE ALERT]: Your IP is banned") samp.exit(); end return false; end function onDialog(id,tipo,titulo,boton_1,boton_2,texto) --AL ABRIR DIALOGO Tipo: 0:alert, 1:input texto, 2:lista | Retornar true para cancelar accion por defecto-- if (string.find(texto,'may register')) then samp.dialogresponse(id, BOTON1, 0, samp.getpassword()) return true; end if (string.find(texto,'password to login')) then samp.dialogresponse(id, BOTON1, 0, samp.getpassword()) return true; end if (string.find(titulo,'Password Change')) then samp.dialogresponse(id, BOTON1, 0, samp.getpassword()) return true; end if (string.find(boton_1,'Dismiss')) then samp.dialogresponse(id,BOTON1,0,"") return true; end if (string.find(titulo,'Notice')) then samp.dialogresponse(id,BOTON1,0,"") return true; end if (string.find(texto,'Providing an invalid')) then samp.dialogresponse(id,BOTON1,0,MYNAME.."NGG@gmail.com") return true; end if (string.find(titulo,'male or female')) then samp.dialogresponse(id,BOTON1,0,"Male") return true; end if (string.find(titulo,'month was your character born')) then samp.dialogresponse(id,BOTON1,5,"June") return true; end if (string.find(titulo,'day was your character born')) then samp.dialogresponse(id,BOTON1,1,"2") return true; end if (string.find(titulo,'year was your character born')) then samp.dialogresponse(id,BOTON1,10,"1970") return true; end if (string.find(texto,'you may press the skip button')) then samp.dialogresponse(id,BOTON2,0,"") return true; end if (string.find(titulo, 'Showing Stat') and INITARGUMENTS=="1" and INTERCEPT_STATS_DLG==true) then if (string.find(texto, 'Playing Hours: 2')) then samp.dialogresponse(id, BOTON2, 0, ""); sendToMallCreate(); else INTERCEPT_STATS_DLG=false; samp.dialogresponse(id, BOTON2, 0, ""); end return true; end if (string.find(titulo, 'Showing Stat') and INITARGUMENTS=="2" and INTERCEPT_STATS_DLG==true) then if (string.find(boton_1, 'Next')) then samp.dialogresponse(id, BOTON1, 1, ""); else if (string.find(texto, 'Weapon Restriction: 0') and INJAIL==false) then INTERCEPT_STATS_DLG=false; samp.dialogresponse(id, BOTON2, 0, ""); sendToMall(); samp.exit(); else INTERCEPT_STATS_DLG=false; samp.dialogresponse(id, BOTON2, 0, ""); end end return true; end if (string.find(titulo,'24/7') and ISMATCREATE == true) then samp.dialogresponse(id,BOTON1,0,"Cell Phone ($2,500)") samp.settimer(503, 1000) return true; end if (string.find(titulo,'24/7') and INITARGUMENTS == "1") then samp.dialogresponse(id,BOTON1,0,"Cell Phone ($2,500)") randomcoord = math.random(1, 10); samp.setposx(averno[randomcoord][1]) samp.setposy(averno[randomcoord][2]) samp.setposz(averno[randomcoord][3]) return true; end return false; end function onDlgResponse(id, boton, list_item, texto_o_elemento) if (ISBUYING == true and ISMATCREATE == false) then samp.settimer(602, 300) end end function onGameStart(myplayerid, hostname, myname) MYNAME=myname; MYID=myplayerid; end function onCheckpoint(x,y,z,radius) --iup.Message('CHECKPOINT DETECTED', tostring(x).." @ " ..tostring(y).." @ " ..tostring(z)) if (ISPIZZAMATRUNNING == true) then CHECKCOORDSX = x; CHECKCOORDSY = y; CHECKCOORDSZ = z; end end function onRakError(errorid) samp.onfootpool(0); end function onDisconnected(timeout) samp.onfootpool(0); end function onPlayerDeath(playerid, name) end function sendToMall() samp.setposx(1066.13); samp.setposy(-1496.34); samp.setposz(22.76); samp.sethealth(100); samp.sleep(500); samp.onfootpool(0); end function sendToMallCreate() samp.settimer(5023, 400) end function sendToAmbulante() samp.setposx(1063.48) samp.setposy(-1502.98) samp.setposz(22.75) end function acceptJob() samp.settimer(400,300) end function onVehicleAdd(id,modelo,posx,posy,posz) if (modelo == 448 and GETPIZZABIKE==true) then GETPIZZABIKE = false; PIZZAID = id; samp.settimer(900, 600) --samp.log("[DEBUG] MODELO: "..tostring(modelo).." ID: "..tostring(id).." X: "..tostring(posx).." Y: "..tostring(posy).." Z: "..tostring(posz)) end end function onWorldAdd(playerid, name) if (string.find(name,'_', nil, true) and PANICMODE == true) then else samp.log("[PANIC] ("..tostring(playerid)..") "..name.." esta cerca o haciendote spec.") samp.exit() end end function lua_dostring(sLua) local Return, Error = pcall(function(s) return loadstring(s)(); end, sLua); return Return, Error; end