Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. addEvent ( "pasar", true ) addEventHandler ( "pasar", getRootElement(), function ( player, vehicle ) if ( getElementDimension ( player ) == 10 ) and ( getElementInterior ( player ) == 0 ) and ( getElementModel ( vehicle ) == 410 ) then destroyElement ( vehicle ) showPlayerHudComponent ( player, "ammo", true ) showPlayerHudComponent ( player, "area_name", true ) showPlayerHudComponent ( player, "armour", true ) showPlayerHudComponent ( player, "breath", true ) showPlayerHudComponent ( player, "clock", true ) showPlayerHudComponent ( player, "health", true ) showPlayerHudComponent ( player, "money", true ) showPlayerHudComponent ( player, "radar", true ) showPlayerHudComponent ( player, "vehicle_name", true ) showPlayerHudComponent ( player, "weapon", true ) setElementDimension ( player, 0 ) givePlayerMoney ( source, 500 ) --- Dinero setElementModel ( source, 188 ) --- Skin setTimer ( setElementInterior, 500, 1, player, 0 ) setTimer ( setElementPosition, 1500, 1, player, -2489.859,2510.48,18.091 ) setTimer ( setPedRotation, 0, 1, player, 0 ) outputChatBox ( "La prueba ha terminado", player, 255, 0, 0, false ) end end )
  2. The event "onPlayerMarkerHit" is server side-only, and you're using getLocalPlayer which is a client side-only function, change it to "source". Also, rootElement is not defined anywhere, you should use "root".
  3. There must be a resource which has it's own chat system.
  4. I tested it and it works, you're testing it with someone else, right? because the script is skipping the local player, so it won't show up on list.
  5. Are you sure that there are no errors? can you post the whole code?
  6. Castillo

    ChatBox

    No se vayan del tema, el problema ya esta resuelto.
  7. He posted the links with the code.
  8. I don't understand what do you want.
  9. And you have permission to sell these scripts?
  10. Castillo

    Mostrar GUI

    function monstrar ( hitElement ) if ( hitElement == localPlayer ) then if isPedInVehicle ( localPlayer ) then guiSetVisible ( ventana, true ) showCursor ( true ) end end end addEventHandler ( "onClientMarkerHit", markerDRIFT, monstrar )
  11. That's right, try this to save time left: local mutedSerials = { } function muteSomeone ( player, cmd, target, time, ... ) local reason = table.concat ( { ... }, " " ) if ( target and reason and time ) then local target = getPlayerFromNamePart ( target ) if ( not isElement ( target ) ) then outputChatBox ( "There is no player with this name", player, 255, 255, 0 ) return end local time = tonumber ( time ) if ( time and time >= 1 and not isPlayerMuted ( target ) ) then local milliseconds = math.floor ( time * 60000 ) outputChatBox ( getPlayerName ( target ) .." has been muted for ".. tostring ( time ) .." minutes (".. reason ..") .", root, 255, 0, 0 ) setPlayerMuted ( target, true ) local timer = setTimer ( unMute, milliseconds, 1, target ) mutedSerials [ getPlayerSerial ( target ) ] = { milliseconds, timer } else outputChatBox ( "Syntax: /mmute player reason time and player cannot be muted", player, 255, 255, 0 ) end end end addCommandHandler ( "mmute", muteSomeone ) function getPlayerFromNamePart(name) if name then for i, player in ipairs(getElementsByType("player")) do if string.find(getPlayerName(player):lower(), tostring(name):lower(), 1, true) then return player end end end return false end function afterreconnect ( local serial = getPlayerSerial ( source ) local muted = mutedSerials [ serial ] if ( type ( muted ) == "table" ) then if ( muted [ 1 ] ) then setPlayerMuted ( source, true ) local timer = setTimer ( unMute, muted [ 1 ], 1, source ) mutedSerials [ serial ] [ 2 ] = timer return end end setPlayerMuted ( source, false ) end addEventHandler ( "onPlayerJoin", getRootElement(), afterreconnect ) addEventHandler ( "onPlayerQuit", root, function ( ) local serial = getPlayerSerial ( source ) local muted = mutedSerials [ serial ] if ( type ( muted ) == "table" ) then if isTimer ( muted [ 2 ] ) then local timeLeft = getTimerDetails ( muted [ 2 ] ) killTimer ( muted [ 2 ] ) mutedSerials [ serial ] [ 1 ] = timeLeft end end end ) function unMute ( thePlayer ) if isElement ( thePlayer ) then setPlayerMuted ( thePlayer, false ) mutedSerials [ getPlayerSerial ( thePlayer ) ] = nil outputChatBox ( "You have been unmuted.", thePlayer, 0, 255, 0 ) end end
  12. There are mods which make the back of the Andromada open.
×
×
  • Create New...