Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. https://wiki.multitheftauto.com/wiki/OnChatMessage
  2. That's the problem then, that's an incomplete XML file.
  3. Castillo

    Fuel help!!

    It already does that, so, what's the problem with it?
  4. The problem is that you should check if the hit player is the local player. And the problem with the buttons not showing is that you are using the wrong tables. GUIEditor = { gridlist = {}, window = {}, button = {}, label = {} } car = { {569}, {597}, {598}, {599} } local teamName = "police" local marker = createMarker( -1604, 650, 7, "cylinder", 1.5, 0, 0, 255, 150 ) local marker2 = createMarker( -1629, 651, 7, "cylinder", 1.5, 0, 0, 255, 150 ) local marker3 = createMarker( -1600, 752, -5, "cylinder", 1.5, 0, 0, 255, 150 ) local marker4 = createMarker( 1598, -1609, 13, "cylinder", 1.5, 0, 0, 255, 150 ) local marker5 = createMarker( 1604, -1688, 5, "cylinder", 1.5, 0, 0, 255, 150 ) local marker6 = createMarker( 1583, -1410, 5, "cylinder", 1.5, 0, 0, 255, 150 ) local marker7 = createMarker( 2274, 2242, 10, "cylinder", 1.5, 0, 0, 255, 150 ) local marker8 = createMarker( 2272, 2478, 10, "cylinder", 1.5, 0, 0, 255, 150 ) GUIEditor.window[1] = guiCreateWindow(251,166,290,342,"Job vehicle", false) guiSetVisible(GUIEditor.window[1],false) GUIEditor.label[1] = guiCreateLabel(10,23,262,26,"Choose a car then click Spawn vehicle .", false, GUIEditor.window[1]) GUIEditor.gridlist[1] = guiCreateGridList(9,49,263,227, false, GUIEditor.window[1]) guiGridListSetSelectionMode(GUIEditor.gridlist[1],2) guiGridListAddColumn(GUIEditor.gridlist[1],"vehicle name",60) GUIEditor.button[1] = guiCreateButton(9,296,69,34,"Spawn Vehicle",false,GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(152,291,129,41,"Close",false,GUIEditor.window[1]) for i,v in ipairs (car) do local carName = getVehicleNameFromModel (v[1]) local row = guiGridListAddRow (GUIEditor.gridlist[1]) guiGridListSetItemText (GUIEditor.gridlist[1], row, 1, carName, false, true) end function onClientClick (button, state, absoluteX, absoluteYe) if (source == GUIEditor.button[1]) then if (guiGridListGetSelectedItem (GUIEditor.gridlist[1])) then local cars = guiGridListGetItemText (GUIEditor.gridlist[1], guiGridListGetSelectedItem (GUIEditor.gridlist[1]), 1) triggerServerEvent ("cars", getLocalPlayer(), cars) end end end addEventHandler ("onClientGUIClick", GUIEditor.button[1], onClientClick) function onClientClick (button, state, absoluteX, absoluteYe) if (source == GUIEditor.button[2]) then guiSetVisible(GUIEditor.window[1],true) showCursor(false) end end addEventHandler ("onClientGUIClick", GUIEditor.button[2], onClientClick) addEventHandler("onClientMarkerHit", marker, function ( hitPlayer, matchingDimension ) if ( hitPlayer == localPlayer and isElementWithinMarker(hitPlayer, marker) ) then if ( getTeamName( getPlayerTeam( hitPlayer ) ) == teamName ) then if getElementType(hitPlayer) == "player" then guiSetVisible ( GUIEditor.window[1], true ) showCursor(false) end else outputChatBox ( "you are not in the team", player, 255, 0, 0, true ) end end end ) addEventHandler("onClientMarkerHit", marker2, function ( hitPlayer, matchingDimension ) if ( hitPlayer == localPlayer and isElementWithinMarker(hitPlayer, marker2) ) then if ( getTeamName( getPlayerTeam( hitPlayer ) ) == teamName ) then if getElementType(hitPlayer) == "player" then guiSetVisible ( GUIEditor.window[1], true ) showCursor(false) end else outputChatBox ( "you are not in the team", player, 255, 0, 0, true ) end end end ) addEventHandler("onClientMarkerHit", marker3, function ( hitPlayer, matchingDimension ) if ( hitPlayer == localPlayer and isElementWithinMarker(hitPlayer, marker3) ) then if ( getTeamName( getPlayerTeam( hitPlayer ) ) == teamName ) then if getElementType(hitPlayer) == "player" then guiSetVisible ( GUIEditor.window[1], true ) showCursor(false) end else outputChatBox ( "you are not in the team", player, 255, 0, 0, true ) end end end ) addEventHandler("onClientMarkerHit", marker4, function ( hitPlayer, matchingDimension ) if ( hitPlayer == localPlayer and isElementWithinMarker(hitPlayer, marker4) ) then if ( getTeamName( getPlayerTeam( hitPlayer ) ) == teamName ) then if getElementType(hitPlayer) == "player" then guiSetVisible ( GUIEditor.window[1], true ) showCursor(false) end else outputChatBox ( "you are not in the team", player, 255, 0, 0, true ) end end end ) addEventHandler("onClientMarkerHit", marker5, function ( hitPlayer, matchingDimension ) if ( hitPlayer == localPlayer and isElementWithinMarker(hitPlayer, marker5) ) then if ( getTeamName( getPlayerTeam( hitPlayer ) ) == teamName ) then if getElementType(hitPlayer) == "player" then guiSetVisible ( GUIEditor.window[1], true ) showCursor(false) end else warnText("You are not police to have vehicle !!!",source,0,255,0) end end end ) addEventHandler("onClientMarkerHit", marker6, function ( hitPlayer, matchingDimension ) if ( hitPlayer == localPlayer and isElementWithinMarker(hitPlayer, marker6) ) then if ( getTeamName( getPlayerTeam( hitPlayer ) ) == teamName ) then if getElementType(hitPlayer) == "player" then guiSetVisible ( GUIEditor.window[1], true ) showCursor(false) end else outputChatBox ( "you are not in the team", player, 255, 0, 0, true ) end end end ) addEventHandler("onClientMarkerHit", marker7, function ( hitPlayer, matchingDimension ) if ( hitPlayer == localPlayer and isElementWithinMarker(hitPlayer, marker7) ) then if ( getTeamName( getPlayerTeam( hitPlayer ) ) == teamName ) then if getElementType(hitPlayer) == "player" then guiSetVisible ( GUIEditor.window[1], true ) showCursor(false) end else outputChatBox ( "you are not in the team", player, 255, 0, 0, true ) end end end ) addEventHandler("onClientMarkerHit", marker8, function ( hitPlayer, matchingDimension ) if ( hitPlayer == localPlayer and isElementWithinMarker(hitPlayer, marker8) ) then if ( getTeamName( getPlayerTeam( hitPlayer ) ) == teamName ) then if getElementType(hitPlayer) == "player" then guiSetVisible ( GUIEditor.window[1], true ) showCursor(false) end else outputChatBox ( "you are not in the team", player, 255, 0, 0, true ) end end end )
  5. Well, just trigger the event to the player that died, 'source' in this case. triggerClientEvent ( source, "updateDieStats", source, totalDies ) triggerClientEvent ( source, "updateTotalDieStats", source, totalStatDies )
  6. I'm not sure if I understand, you want to set a timer when a map starts, and if the timer was already started, kill it?
  7. Proba esta otra: http://www.gametracker.com/
  8. "skins\skin.txd" type="client"/> "skins\skin.dff" type="client"/> As you can see, the path is different than the one you're using in the script. Just make both paths the same.
  9. Yes, it is, use "ALTER TABLE". "ALTER TABLE tableName ADD columnName columnType"
  10. Making stuff like this doesn't make you a MTA Team member, just saying.
  11. This section is to help people, we aren't here to make things for lazy-ass people.
  12. You can define the color variable and then use that in the dxDrawColor, then to change it, you set a timer to update that variable.
  13. Of what text are you talking about?
  14. Castillo

    help edit

    You're welcome.
  15. function ff ( ) local = createObject ( 1950, 0, 0, 0, 0, 0, 0 ) exports [ "bone_attach" ]:attachElementToBone ( , localPlayer, 12, 0, 0, 0, rotX, rotY, rotZ ) end addEventHandler("onClientMarkerHit", markerz, ff) Change the "rotX" or "rotY" or "rotZ".
  16. setPedAnimation ( myped, "BLOCK", "ANIM", -1, false, true, false, false ) Try that.
  17. I don't understand what do you mean.
×
×
  • Create New...