-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
Is a server side script.
-
addEventHandler ( "onPlayerQuit", root, function ( ) if ( isElement ( vehicles [ source ] ) ) then destroyElement ( vehicles [ source ] ) end end )
-
You're welcome.
-
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 )
-
Post the code where you hit the marker.
-
-- 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 )
-
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
-
Firstly, intead of save getPlayerTeam result, do getTeamName ( getPlayerTeam ( source ) ) then, you get the team element from it's name with getTeamFromName
-
Because you are saving the team element userdata value, not the team name.
-
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
-
I made a fast command ( "/dance" ) and used it, but it worked fine, I didn't lose the animation when finished writing it.
-
Correct me if I'm wrong, your problem is that the script is removing the animation even when is not the chat animation?
-
onClientPlayerJoin is only triggered for remote players, he has to use onClientResourceStart.
-
This can be done via scripting.
-
Add 'false, false' at the end of every guiGridListSetItemText.
-
If you don't tell us what is wrong, then how can we help you fix it?
-
Yes, but remove 0.25.
-
Is the second argument of the function, just after object model.
-
You got missing radius.
-
For what I see in your script, it has most arguments, only needs the radius argument. https://wiki.multitheftauto.com/wiki/RemoveWorldModel
-
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.
-
Post the script at pastebin.com, it's too long for the post.