Jump to content

itHyperoX

Members
  • Posts

    522
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by itHyperoX

  1. how can i make something this currentSkin = getElementModel(source) setElementModel(source,math.random(currentSkin ,28)) so, 28 or the currentskin
  2. itHyperoX

    Serials

    @Abdul KariM thats it what the guy need. here you go all in one addCommandHandler("register",function(source,cmd,username,password) if (#getAccountsBySerial(getPlayerSerial(source)) >= 1 ) then outputChatBox("You are already registered!.",source,255,255,255,true) return end if(password ~= "" and password ~= nil and username ~= "" and username ~= nil and (string.len(username)>=4) and (string.len(password)>=4) ) then local accountCreated = addAccount(username,password) if (accountCreated) then outputChatBox("You Succesfully registered.",source,255,0,0,true) else outputChatBox("Contact with the admin.",source,255,0,0,true) end else outputChatBox("The username and password must be 4 character.",source,255,0,0,true) outputChatBox(" /register [Username] [Password]",source,255,255,255,true) end end)
  3. itHyperoX

    Serials

    I dont know how you can make that maybe the pro can help you. @NeXuS™, when the serial is used, but something this: local bRegisteredOnce = false addCommandHandler("register",function(source,commandName,username,password) local theSerial = getPlayerSerial( source ) --> Serial -- Here something for cancelevent if the serial in use if(password ~= "" and password ~= nil and username ~= "" and username ~= nil and bRegisteredOnce == false and (string.len(username)>=4) and (string.len(password)>=4) ) then local accountAdded = addAccount(username,password) if(accountAdded) then outputChatBox("Account added",source) local account = getAccount(username,password) setAccountData(account,"Serial",theSerial) bRegisteredOnce = true else end else if bRegisteredOnce == true then else end end end)
  4. function pedLoad () APed = createPed ( 205, 2489, -1665, 13 ) setElementInterior(APed,3) setElementDimension(APed,0) setTimer(setPedRotation,5000,1,APed,270 ) setTimer(setPedAnimation,5000,1,APed,"DANCING","DAN_Down_A",-1,true,true,true ) end addEventHandler ( "onResourceStart", getRootElement(), pedLoad )
  5. Thank you Nexus. One and last question. How can i make that, if the airdrop is down, then not starting the new one? I tried with setElementData, getElementData but i always got debugerror. Expected element at argument 1 Here is how i did function dropTHIS() local rTable = posTable[math.random(#posTable)] spawnX, spawnY, spawnZ = unpack(rTable[1]) endX, endY, endZ = unpack(rTable[2]) object = createObject(objectID, spawnX, spawnY, spawnZ, rotX, rotY, rotZ) --< Creating the object >-- moveObject(object, Speed, endX, endY, endZ) setElementDoubleSided(object,true) thisblip = createBlip(endX, endY, endZ,40) setTimer(function() outputChatBox("The airdrop is on the ground in about 5 minutes!",root,255,255,255,true) end,3*100,1) setTimer(function() arrowMarker = createMarker(endX, endY, endZ,"cylinder",2, 255, 0, 0, 170 ) setElementData(root,"AirDropDown",true) -- Trying to set the data, the object is on the ground end,9*100,1) end addEventHandler("onResourceStart",root,dropTHIS) setTimer(function() if getElementData(root,"AirdropDown") == true then return end -- Trying to get the data, if is on the ground cancel the drop. local players = getPlayerCount() if tonumber(players) > 0 then -- 0 = 1 dropTHIS() else outputChatBox("players",root,255,255,255,true) return end end,20000,0)
  6. I need a little help again. So i want make more positions, how can i add that? Because if i just add random positions with random ending positions, its can be so bad because of the object. i wondering something like this: local table = { local table = { --ID, StartingPOS, ENDINGPOS [0] = { "6556,411,60", "6556,411,40",}, [1] = {"445,31,502", "445,31,480""}, } And picking the random position by id, and it going good all the time because the positions is the same, only the Z cordinata changing So i want to add more starting positions and ending positions, but this can NOT work with random, because of the object ground.. Anybody please give me any tip how can i add more positions? I hope anyone understand what i want to do. Here is the code local objectID = 964 --< The object ID >-- local Dx, Dy, Dz = 2640.75390625, 805.8369140625, 469.8203125 --< Starting Position >-- local rotX, rotY, rotZ = 0, 0, 90 --< Rotation >-- local Ex, Ey, Ez = 2640.75390625, 805.8369140625, 5.3157968521118 --< Ending Position >-- local Speed = 9*100000 --< Speed >-- function dropTHIS() object = createObject(objectID, Dx, Dy, Dz, rotX, rotY, rotZ) --< Creating the object >-- moveObject(object, Speed, Ex, Ey, Ez) setElementDoubleSided(object,true) setTimer(function() outputChatBox("The airdrop is on the ground in about 5 minutes!",root,255,255,255,true) end,3*100000,1) setTimer(function() arrowMarker = createMarker(1348.4276123047, 1333.0045166016,9.8,"cylinder",2, 255, 0, 0, 170 ) --< Creating the marker because attaching >-- end,9*100000,1) end addEventHandler("onResourceStart",root,dropTHIS) setTimer(function() dropTHIS() end,43200000,1) --< 12 hours each drop >-- function hitT(hitElement) local timeTO = 12*100000 --< 2 minutes >-- if source == arrowMarker and getElementType(hitElement) == "player" then destroyElement(arrowMarker) setElementFrozen(hitElement, true) setPedAnimation(hitElement , "rob_bank", "cat_safe_rob", timeTO, true, true, true, false) setTimer(setElementFrozen,timeTO,1,hitElement,false) setTimer(function() destroyElement(object) outputChatBox("Hit") giveWeapon(hitElement,24,math.random(20,60)) giveWeapon(hitElement,26,math.random(40,120)) giveWeapon(hitElement,math.random(30,31),math.random(200,500)) giveWeapon(hitElement,math.random(33,34),math.random(20,150)) giveWeapon(hitElement,math.random(35,38),math.random(25,200)) end,timeTO,1) end end addEventHandler("onMarkerHit",root,hitT)
  7. for kills: exports.scoreboard:addScoreboardColumn("Kills",getRootElement(),7,55) addEventHandler("onPlayerWasted",root,function(totalAmmo,killer,killerWeapon,bodypart,stealth) if ( killer ) then local accountKiller = getPlayerAccount ( killer ) if ( getElementType(killer) == "player" ) then setAccountData(accountKiller,"Kills",tonumber(getAccountData(accountKiller,"Kills") or 0 ) + 1 ) setElementData(killer,"Kills",tonumber(getAccountData(accountKiller,"Kills"))) end end end) addEventHandler("onPlayerLogin",root,function(thePreviousAccount,theCurrentAccount,autoLogin) local account = getPlayerAccount ( source ) if not getAccountData( account,"account:Kills" ) then setAccountData( account,"account:Kills",0 ) end setElementData(source,"Kills",tonumber(getAccountData(account,"account:Kills" ) or 0 ) ) end) For total time (This is give +1 level every played hours) setTimer(function() if getElementData(localPlayer,"Level") then setElementData(localPlayer,"Level",getElementData(localPlayer,"Level") + 1) end end, 36*100000, 0)
  8. I think you dont understand what i want to do. Anyway thanks your help.
  9. i want make that, when the box on the ground only then destroy the box, not when the resource start, because what you said, it creating the marker when resource start. I want that when the box on the ground and the player hit the marker destroy
  10. if i'm remove that, there is no marker
  11. Its not working. I tried to move the marker away like + x ,y ,z ,tried to make marker bigger but not. But when i'm jump on it then working
  12. local markerSize = 2.4 local object = createObject(objectID, Dx, Dy, Dz, rotX, rotY, rotZ) --< Creating the object >-- setElementDoubleSided(object,true) local arrowMarker = createMarker(0,0,0, "cylinder",markerSize, 255, 0, 0, 170 ) --< Creating the marker because attaching >-- attachElements(arrowMarker,object, 0, 0, 0, 0, 0, 0) -- < Attach... >-- now this looks like the ration is fine
  13. yes ofcurse, not destroying when im just run in to marker, but when i'm on the "box" (object) then destroying
  14. im tried buddy nothing.
  15. Is that okey, when i hit the marker nothing happens, but when i'm jump into the marker then destroying?
  16. hmm.. I'm stuck here, its always saying "Hit" and destroying everything when the resource start. local objectID = 964 --< The object ID >-- local Dx, Dy, Dz = 1348.4276123047, 1333.0045166016, 23.620292663574 --< Starting Position >-- local rotX, rotY, rotZ = 0, 0, 90 --< Rotation >-- local Ex, Ey, Ez = 1348.4276123047, 1333.0045166016, 9.8 --< Ending Position >-- local Speed = 15000 --< Speed >-- local markerSize = 2 local object = createObject(objectID, Dx, Dy, Dz, rotX, rotY, rotZ) --< Creating the object >-- local arrowMarker = createMarker(0,0,0, "cylinder",markerSize, 255, 0, 0, 170 ) --< Creating the marker because attaching >-- attachElements(arrowMarker,object, 0, 0, 2 ) -- < Attach... >-- function dropTHIS() moveObject(object, Speed, Ex, Ey, Ez) setElementDoubleSided(object,true) end addEventHandler("onResourceStart",root,dropTHIS) function hitT(hitElement) destroyElement(arrowMarker) destroyElement(object) outputChatBox("Hit") end addEventHandler("onMarkerHit",root,hitT)
  17. Hello guys. I wanna make an "airdrop" script, i think this is very easy, i just dont know what should i use for this. The idea: When the resource start,or the next "timer" start the script pick a random position from table, and starting dropping down the "object". When the object is on the ground, its creating marker or anything, (onPlayerHit) then give the player weapons, and ammos. Can anybody give me any tip, what should i use for this? Which functions
  18. itHyperoX

    help

    Thats wrong. Here is local Marker1 = createMarker (1348.4315185547, -1150.189453125, 23.700422286987, "cylinder", 4, 255, 0, 0, 100) addEventHandler( "onMarkerHit", Marker1,function(source) for i,v in ipairs(getElementsByType("player")) do setElementPosition(source, 1637.2869873047, -1132.6866455078, 23.90625 ) outputChatBox("Welcome to Los Santos Boss Area!",source ) end end)
  19. itHyperoX

    help

    try this local Marker1 = createMarker (1638.0502929688, -1152.9975585938, 22.5, "cylinder", 4, 255, 0, 0, 100) addEventHandler( "onMarkerHit", Marker1,function(source) if getElementType(source) == "player" then setElementPosition(source, 1637.2869873047, -1132.6866455078, 23.90625 ) outputChatBox("Welcome to Los Santos Boss Area!",source ) end end)
  20. Dont say making when you just editing leaked script
  21. post your login code here Which is showing this
  22. You saying this leaked script is yours. What a :O
×
×
  • Create New...