Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. addEventHandler ( "onPlayerQuit", root, function ( ) if ( isElement ( vehicles [ source ] ) ) then destroyElement ( vehicles [ source ] ) end end )
  2. addEventHandler ( "onClientMarkerHit", marker, function ( hitElement ) if ( hitElement == localPlayer ) then if ( getElementType ( hitElement ) == "player" and not isPedInVehicle ( hitElement ) ) then createVehGui ( hitElement ) if ( MainGui ~= nil ) then guiSetVisible ( MainGui, true ) showCursor ( true ) guiSetInputEnabled ( true ) setElementFrozen ( hitElement, true ) end end end end )
  3. Post the code where you hit the marker.
  4. -- client side: GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Grid = {} addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) GUIEditor_Window[3] = guiCreateWindow(322,193,361,409,"Aviator Free Car Spawner by Robbster",false) guiSetVisible ( GUIEditor_Window[3], false ) GUIEditor_Label[3] = guiCreateLabel(102,115,117,123,"",false,GUIEditor_Window[3]) GUIEditor_Grid[3] = guiCreateGridList(42,54,277,216,false,GUIEditor_Window[3]) guiGridListAddColumn(GUIEditor_Grid[3],"Airport Cars",0.9) for i = 1, 3 do guiGridListAddRow(GUIEditor_Grid[3]) end guiGridListSetItemText(GUIEditor_Grid[3],0,1,"Baggage",false,false) guiGridListSetItemText(GUIEditor_Grid[3],1,1,"Tug",false,false) guiGridListSetItemText(GUIEditor_Grid[3],2,1,"Utility Van",false,false) GUIEditor_Button[3] = guiCreateButton(40,307,296,80,"Close",false,GUIEditor_Window[3]) addEventHandler ( 'onClientGUIClick', GUIEditor_Button[3], onButtonClick, false ) addEventHandler( "onClientGUIDoubleClick", GUIEditor_Grid[3], doubleClicked, false ) end ) function doubleClicked ( ) local row, col = guiGridListGetSelectedItem ( source ) if ( row and col and row ~= -1 and col ~= -1 ) then local vehicleName = guiGridListGetItemText ( source, row, 1 ) triggerServerEvent ( "spawnVehicle", localPlayer, vehicleName ) end end -- server side: addEvent ( "spawnVehicle", true ) addEventHandler ( "spawnVehicle", root, function ( vehicleName ) local vehicleModel = getVehicleModelFromName ( vehicleName ) if ( vehicleModel ) then local x, y, z = getElementPosition ( source ) local vehicle = createVehicle ( vehicleModel, x, y, z ) warpPedIntoVehicle ( source, vehicle ) end end )
  5. Castillo

    I need help!

    If I'm not wrong, the problem is here: if button == "left" and state == "up" then Remove the state check or change it to: if button == "left" and state == "down" then
  6. Firstly, intead of save getPlayerTeam result, do getTeamName ( getPlayerTeam ( source ) ) then, you get the team element from it's name with getTeamFromName
  7. Because you are saving the team element userdata value, not the team name.
  8. Castillo

    GUI help!

    Planecarmarker = createMarker ( 1684.59326, 1453.62866, 9.76983 , "cylinder", 2, 9, 233, 213, 105 ) function MarkerHit2 ( hitPlayer, matchingDimension ) if ( hitPlayer == localPlayer ) then guiSetVisible ( GUIEditor_Window[3], true ) end end addEventHandler ( "onClientMarkerHit", Planecarmarker, MarkerHit2 ) --PutCarFreeSpawn GUI HERE!!! GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Grid = {} addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) GUIEditor_Window[3] = guiCreateWindow(322,193,361,409,"Aviator Free Car Spawner by Robbster",false) guiSetVisible ( GUIEditor_Window[3], false ) GUIEditor_Label[3] = guiCreateLabel(102,115,117,123,"",false,GUIEditor_Window[3]) GUIEditor_Grid[3] = guiCreateGridList(42,54,277,216,false,GUIEditor_Window[3]) guiGridListAddColumn(GUIEditor_Grid[3],"Airport Cars",0.9) for i = 1, 3 do guiGridListAddRow(GUIEditor_Grid[3]) end guiGridListSetItemText(GUIEditor_Grid[3],0,1,"Baggage",false,false) guiGridListSetItemText(GUIEditor_Grid[3],1,1,"Tug",false,false) guiGridListSetItemText(GUIEditor_Grid[3],2,1,"Utility Van",false,false) GUIEditor_Button[3] = guiCreateButton(40,307,296,80,"Close",false,GUIEditor_Window[3]) addEventHandler ( 'onClientGUIClick', GUIEditor_Button[3], onButtonClick, false ) end ) function onButtonClick ( ) setCameraTarget ( localPlayer ) guiSetVisible ( GUIEditor_Window[3], false ) --removes GUI on click Exit Button showCursor ( false ) --removing the cursor end
  9. I made a fast command ( "/dance" ) and used it, but it worked fine, I didn't lose the animation when finished writing it.
  10. Correct me if I'm wrong, your problem is that the script is removing the animation even when is not the chat animation?
  11. Castillo

    Help :)

    You must use onClientGUIClick combined with guiSetVisible. Edit: And yes, you would need to export it, or make a custom event.
  12. onClientPlayerJoin is only triggered for remote players, he has to use onClientResourceStart.
  13. This can be done via scripting.
  14. Castillo

    GUI help!

    Add 'false, false' at the end of every guiGridListSetItemText.
  15. Castillo

    GUI help!

    If you don't tell us what is wrong, then how can we help you fix it?
  16. Is the second argument of the function, just after object model.
  17. Tug vehicle model: 583
  18. For what I see in your script, it has most arguments, only needs the radius argument. https://wiki.multitheftauto.com/wiki/RemoveWorldModel
  19. Castillo

    Modo STAFF

    Casi todo esta mal. function desactivarstaff ( thePlayer ) for _, group in ipairs ( { "Creador", "Admin", "SuperModerator", "Moderator" } ) if isObjectInACLGroup ( "user.".. getAccountName ( getPlayerAccount ( thePlayer ) ), aclGetGroup ( group ) ) then setPlayerTeam ( thePlayer, getTeamFromName ( "Civiles" ) ) outputChatBox ( "Modo Staff desactivado.", thePlayer, 255, 255, 255 ) break end end end addCommandHandler ( "nostaff", desactivarstaff ) function activarstaff ( thePlayer ) for _, group in ipairs ( { "Creador", "Admin", "SuperModerator", "Moderator" } ) if isObjectInACLGroup ( "user.".. getAccountName ( getPlayerAccount ( thePlayer ) ), aclGetGroup ( group ) ) then setPlayerTeam ( thePlayer, getTeamFromName ( "STAFF" ) ) outputChatBox ( "Modo Staff activado.", thePlayer, 255, 255, 255 ) break end end if ( not getPlayerTeam ( thePlayer ) == getTeamFromName ( "STAFF" ) ) then outputChatBox ( "Usted no es del Staff", thePlayer ) end end addCommandHandler ( "equipostaff", activarstaff ) 1: setTeamName es para cambiarle el nombre a un equipo, se usa setPlayerTeam para cambiar de equipo a un jugador. 2: isObjectInACLGroup require el usuario ( la cuenta ). 3: aclGetGroup require UN solo string, no 4.
  20. Post the script at pastebin.com, it's too long for the post.
×
×
  • Create New...