Jump to content

blackpenguin98

Members
  • Posts

    7
  • Joined

  • Last visited

Everything posted by blackpenguin98

  1. When i write "debugscript 3" in console it says me "incorrect client type for this commands"
  2. But what other error i have? how I know what errors are? Im new in scripting, this is my first script and I want to make that a ped whit a colshape so that when you enter the col a gui is created so you can accept the job or not. (sorry for bad english)
  3. It doesnt work .-. I am a new scripter and I want to learn please Help me this is the code: Server: function tped () local ped = createPed ( 133, 165.5587, -27.8196, 1.5781 ) local attached = createBlipAttachedTo ( ped, 60 ) setElementFrozen ( ped, true ) setBlipVisibleDistance ( attached, 800 ) end addEventHandler ("onResourceStart", getResourceRootElement ( getThisResource () ), tped) function Confirm ( button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedElement ) local tt = createTeam ( "Trucker", 255, 255, 0 ) setElementModel ( thePlayer, 133 ) setPlayerTeam ( thePlayer, "Trucker" ) end Client: function CreateGui ( theElement, matchingDimension ) local x = 0.375 local y = 0.375 local width = 0.25 local height = 0.25 local twindow = guiCreateWindow ( x, y, width, height, "Trucker Job", true ) x = 0.400 y = 0.400 width = 0.05 height = 0.05 guiCreateLabel ( x, y, width, height, "In trucker job you need to deliver some stuff to the gas stations.", true, twindow ) x = 0.100 y = 0.150 width = 0.02 height = 0.02 local conb = guiCreateButton ( x, y, width, height, "Confirm", true, twindow ) x = 0.400 local canb = guiCreateButton ( x, y, width, height, "Cancel", true, twindow ) guiSetVisible( twindow, false ) end addEventHandler ("onClientResourceStart", getResourceRootElement ( getThisResource () ), CreateGui) addEventHandler ( "onClientClick", conb, Confirm ) addEventHandler ( "onClientClick", canb, Cancel ) function Cancel ( button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedElement ) guiSetVisible( twindow, false ) showCursor ( false ) end function nigga () local tc = createColTube ( 165.5587, -27.8196, 1.5781, 10, 5) end addEventHandler ("onClientResourceStart", getResourceRootElement ( getThisResource () ), nigga) function check (hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(twindow) then guiSetVisible( twindow, true ) showCursor ( true ) end end end addEventHandler( "onClientColShapeHit", tc, check )
  4. When I go to the location where I create the colshape anything happen, i think that the problem is that the colshape isnt created correctly. Please help
  5. I want to make that when someone enter a colshape a gui opens. Meta: Client: addEventHandler ( "onResourceStart", getRootElement(), CreateGui ) function CreateGui ( theElement, matchingDimension ) local x = 0.375 local y = 0.375 local width = 0.25 local height = 0.25 local twindow = guiCreateWindow ( x, y, width, height, "Trucker Job", true ) x = 0.400 y = 0.400 width = 0.05 height = 0.05 guiCreateLabel ( x, y, width, height, "In trucker job you need to deliver some stuff to the gas stations.", true, twindow ) x = 0.100 y = 0.150 width = 0.02 height = 0.02 local conb = guiCreateButton ( x, y, width, height, "Confirm", true, twindow ) x = 0.400 local canb = guiCreateButton ( x, y, width, height, "Cancel", true, twindow ) guiSetVisible( twindow, false ) end addEventHandler ( "onClientClick", conb, Confirm ) addEventHandler ( "onClientClick", canb, Cancel ) function Cancel ( button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedElement ) guiSetVisible( twindow, false ) showCursor ( false ) end addEventHandler( "onClientColShapeHit", tc, check ) function check () guiSetVisible( twindow, true ) showCursor ( true ) end Server: function tped () local ped = createPed ( 133, 165.5587, -27.8196, 1.5781 ) local attached = createBlipAttachedTo ( ped, 60 ) local tc = createColTube ( 165.5587, -27.8196, 1.5781, 10, 5) setElementFrozen ( ped, true ) setBlipVisibleDistance ( attached, 800 ) end addEventHandler ( "onResourceStart", getRootElement(), tped ) function Confirm ( button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedElement ) local tt = createTeam ( "Trucker", 255, 255, 0 ) setElementModel ( thePlayer, 133 ) setPlayerTeam ( thePlayer, "Trucker" ) end
×
×
  • Create New...