Jump to content

ViRuZGamiing

Members
  • Posts

    1,050
  • Joined

  • Last visited

Everything posted by ViRuZGamiing

  1. I've asked that too when I was new, It's possible by replacing the dxDrawRectangle in the scoreboard script to dxDrawImage I guess
  2. ViRuZGamiing

    Extample

    you can do a table with tables inside; spawnTable = { [1] = {2886, 217, 122, 1003.9, 0, 0, 0}, [2] = {1508, 213.89999, 122.5, 1003.90002, 0, 0, 90}, [3] = {9131, 214, 122.4, 1003.40002, 0, 0, 0}, [4] = {9131, 214, 122.4, 1005.66998, 0, 0, 0}, [5] = {9131, 217, 122.3, 1005.66998, 0, 0, 0}, } for i=1,5 do local spawnpoint = spawnPlayer(math.random(spawnTable[i])) end Not tested
  3. gate= createObject(980, 1579, 713.6, 12.5, 0, 0, 0) -- Not quite sure if the rotation should be 0 else edit it nottrue = false addCommandHandler("gate", function (thePlayer) team = getPlayerTeam (thePlayer) if ( getTeamName ( team ) == "The Montana Family" ) then local x, y, z = getElementPosition(thePlayer) local distance = getDistanceBetweenPoints3D (x, y, z, 1579, 713.6, 12.5) if distance < 35 then if (nottrue == false) then moveObject( insideDoor, 2000, 1579, 713.6, 12.5, 0, 0, 0 ) nottrue = true elseif (nottrue == true) then moveObject( insideDoor, 2000, 1579, 713.6, 7, 0, 0, 0 ) nottrue = false end end else outputChatBox("Access Denied!", thePlayer, 255, 100, 0) end end) Here you go!
  4. give me your values and i'll fill it in
  5. Fill in your requirements gate= createObject() -- Fill in ModelID, x,y,z, rx, ry, rz nottrue = false addCommandHandler("gate", function (thePlayer) team = getPlayerTeam (thePlayer) if ( getTeamName ( team ) == "EDIT" ) then -- change the EDIT to your Faction name local x, y, z = getElementPosition(thePlayer) local distance = getDistanceBetweenPoints3D (x, y, z, gx, gy, gz) -- change the gx, gy, gz to your Gate coordinates, stay off of the x, y, z if distance < 35 then if (nottrue == false) then moveObject( insideDoor, 2000, x, y, z, 0, 0, 0 ) nottrue = true elseif (nottrue == true) then moveObject( insideDoor, 2000, x, y, z, 0, 0, 0 ) nottrue = false end end else outputChatBox("Access Denied!", thePlayer, 255, 100, 0) end end) This is what I use
  6. I will post it here when it's done also the progess will be posted.
  7. Fixed it myself, sry policeVehicles = { [598]=true, [596]=true, [597]=true, [599]=true, [427]=true, [525]=true, [523]=true } policeSkins = { [280]=true, [281]=true, [282]=true, [283]=true, [284]=true, [285]=true, [286]=true } function enterVehicle ( thePlayer, seat, jacked ) if ( policeVehicles[getElementModel ( source )] ) and ( not policeSkins[getElementModel ( thePlayer )] ) and ( getPedOccupiedVehicleSeat (thePlayer) == 0) then removePedFromVehicle ( thePlayer ) outputChatBox ( "Access Denied, employees only!", thePlayer ) end end addEventHandler ( "onVehicleEnter", getRootElement(), enterVehicle )
  8. Hi, This is my code policeVehicles = { [598]=true, [596]=true, [597]=true, [599]=true, [427]=true, [525]=true, [523]=true } policeSkins = { [280]=true, [281]=true, [282]=true, [283]=true, [284]=true, [285]=true, [286]=true } function enterVehicle ( thePlayer, seat, jacked ) if ( policeVehicles[getElementModel ( source )] ) and ( not policeSkins[getElementModel ( thePlayer )] ) then removePedFromVehicle ( thePlayer ) outputChatBox ( "Access Denied, employees only!", thePlayer ) end end addEventHandler ( "onVehicleEnter", getRootElement(), enterVehicle ) I'm assuming that i would be kicked out of the car too when I'm in the backseat, How can I set only removePedFromVehicle on Driver seat?
  9. Hello Community, I see very much people asking for a Police script and much of them are just bad... I'm currently developing a Police script which includes; What i'll be scripting more; I'm posting screenshots later, suggest the stuff you think what would be nice. Viruz out!
  10. I suggest to use a Table for the Markers... markersPosTable= { [1] = {0, 0, 0, "cylinder", 2.0}, [2] = {1, 1, 1, "cylinder", 2.0}, [3] = {2, 2, 2, "cylinder", 2.0}, } for i=1,3 do local object = createMarker(unpack(markersPosTable[i])) end
  11. BTW can I add that the command can only be used in range of the gate? not all over the world
  12. I changed this and it works, local police = getPlayerTeam(thePlayer) policeTeam = createTeam ("Police", 255, 100, 0) if ( police == policeTeam ) then
  13. No Errors, No debugs anymore; insideDoor = createObject(10150, 239.6, 117.6, 1004.3, 0, 0, 0) setElementInterior(insideDoor, 10) nottrue = false addCommandHandler("door", function (thePlayer) local police = getPlayerTeam(thePlayer) if ( police == "Police" ) then if (nottrue == false) then moveObject( insideDoor, 2000, 239.6, 117.6, 1006.8, 0, 0, 0 ) nottrue = true elseif (nottrue == true) then moveObject( insideDoor, 2000, 239.6, 117.6, 1004.3, 0, 0, 0 ) nottrue = false else outputChatBox("Access Denied, employees only!", thePlayer, 255, 100, 0) end end end) No output when not in Police Team and doesn't move when in team
  14. Hi, here's the code; insideDoor = createObject(10150, 239.6, 117.6, 1004.3, 0, 0, 0) setElementInterior(insideDoor, 10) nottrue = false addCommandHandler("door", function () local police = getPlayerTeam(thePlayer) if ( police == "Police" ) then if (nottrue == false) then moveObject( insideDoor, 2000, 239.6, 117.6, 1004.3, 0, 0, 0 ) nottrue = true elseif (nottrue == true) then moveObject( insideDoor, 2000, 239.6, 117.6, 1006.8, 0, 0, 0 ) nottrue = false else outputChatBox("Access Denied, employees only!", thePlayer, 255, 100, 0) end end end) Bad Agument @ getPlayerTeam
  15. Line 1275 of the dash_c.lua file and line 2021 of dash.lua are needed.
  16. Post the Lines of the script (not the whole script)
  17. Use /debugscript 3 ingame and send us the Error + the scripts lines.
  18. Yea didn't know he wanted the World Position thats why it sounded so weird
  19. Write: local x, y, width, height= 2035.3903808594, 1349.2917480469, 3, 2 -- Not quite sure if this is right dxDrawText("Criminal", x, y, width, height, tocolor( 255, 0, 0, 255) , 1, "default-bold" ) OR fill in the argument (I prefer this) dxDrawText("Criminal", 2035.3903808594,1349.2917480469, 3, 2, tocolor( 255, 0, 0, 255) , 1, "default-bold" )
  20. Thats not how it works, i'm belgian we speak dutch and I learned some scripting You're location is set as London, Ontario why shouldn't you understand english? Learn it is the only option, if you have problems with your script post them and we'll help but no script requests
  21. You say you're new and have a problem, there's no problem. There's no script. https://wiki.multitheftauto.com/wiki/Sc ... troduction
  22. Because you didn't script a Arrest part?! This is just start Job and GUI
  23. He means that the basic binded f10 window opens. Unbind it or change your key.
×
×
  • Create New...