Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Lo podes crear muy facilmente con la funcion createExplosion y usando el evento onClientPlayerWeaponFire.
  2. Usa el evento onVehicleExplode y la funcion destroyElement.
  3. Maybe you seen my stargate transport rings I once shown . @FirstMn_: Looks cool, good work with it
  4. Castillo

    Read!

    Or if you do want a lot of mods, then script a custom downloader which will download the mods in the background, meanwhile the player can play freely.
  5. No, that function already exist in MTA 1.3.5.
  6. You mean if an event handler is already handled?
  7. You can attach the event handler to the marker you want to trigger the function.
  8. Means the resource "acl" is not running.
  9. You can use one of these events: onMarkerHit --> server side onClientMarkerHit --> client side
  10. Castillo

    URGENT!

    You should give more information, such as, what community is it?
  11. Maybe you had put it before creating the button, the problem was that the event was being added when the button didn't exist yet, since "pilotPanelOne" was not yet executed.
  12. function clickbtn ( button, state, absoluteX, absoluteY, thePlayer) local row, col = guiGridListGetSelectedItem ( player_namesgrd ) if ( source == slap_btn ) then if ( row and col and row ~= -1 and col ~= -1 ) then if ( not guiGetVisible ( slap_wnd ) ) then guiSetVisible ( slap_wnd, true ) guiBringToFront ( slap_wnd ) end else guiSetText ( slap_edit, "Please, select a player first" ) end end end Try it.
  13. The event handler has to go inside "pilotPanelOne" function. function pilotPanelOne ( ) rWin = guiCreateWindow(472, 289, 158, 152, "Pilot Work", false) guiWindowSetSizable(rWin, false) leaveJob = guiCreateButton(12, 70, 136, 31, "Leave the job.", false, rWin) getJob = guiCreateButton(12, 29, 136, 31, "Get the job.", false, rWin) theClose = guiCreateButton(12, 111, 136, 31, "Close.", false, rWin) outputChatBox ("Works") showCursor (true) addEventHandler ("onClientGUIClick", theClose, whenPlayerClickToClose, false) -- Here end addEvent ("pilotPanelOne", true) addEventHandler ("pilotPanelOne", getLocalPlayer(), pilotPanelOne) function whenPlayerClickToClose (button, state, absoluteX, absoluteY) outputChatBox ("Works") guiSetVisible (rWin, false) showCursor (false) end
  14. addEventHandler("onClientResourceStart", root, abrir) Si usas "root" se ejecutara la funcion cuando inicie cualquier recurso, no solo este, cambialo por "resourceRoot". addEventHandler ( "onClientResourceStart", resourceRoot, abrir )
  15. Eso es porque la variable la estas re-definiendo cada ves. local Day = 0 setTimer ( function ( ) setGameType ( "Dia : ".. Day .."" ) setMapName ( "Fairview" ) Day = ( Day + 1 ) end , 10000, 0 )
  16. function MarkerC ( ) local veh = getPedOccupiedVehicle ( source ) -- Get the player vehicle. if ( veh ) then -- If he is in a vehicle... local trailer = getVehicleTowingVehicle ( veh ) -- Get the trailer of the vehicle. if ( trailer and getElementModel ( trailer ) == 435 ) then -- If it has a trailer and the trailer model is 435.. local theTeamX = getTeamFromName ( "Without Job" ) if ( theTeamX ) then setPlayerTeam ( source, theTeamX ) setPlayerNametagColor ( source, 255, 255, 255 ) givePlayerMoney ( source, 35000 ) else outputChatBox ( "The team doesn't exist" ) end else outputChatBox ( "Not a trailer or the trailer model is not 435" ) end else outputChatBox ( "Not in a vehicle" ) end end addEvent ( "MarkerC", true ) addEventHandler ( "MarkerC", root, MarkerC )
  17. Les pido que no se vayan del tema, si nosotros los moderadores vemos que alguien esta haciendo "backseat moderation", nos encargaremos nosotros del usuario.
  18. I don't know if it could be useful for what you're trying to do, but maybe you can make use of the recently added getCamera function. https://wiki.multitheftauto.com/wiki/GetCamera
  19. You must change the resource that is setting the "class" element data.
  20. Castillo

    Playtime

    Did you do what I said? add outputs in the saving/loading, etc. That will make it a lot easier to spot the problem.
×
×
  • Create New...