Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. If I understand you correctly, before the vehicle starts burning, it has to set a timer of 10 seconds to set a timer of 1 second to increase vehicle health?
  2. local can = { command = true } function start ( player ) if ( can.Command == true ) then setTimer ( stop, 5000, 1 ) can.Command = false outputChatBox ( "Can!", player, 255, 255, 255, true ) else outputChatBox ( "Can't!", player, 255, 255, 255, true ) end end addCommandHandler ( "test2", start ) function stop ( ) can.Command = true outputChatBox ( "Now Can Again!", root, 255, 255, 255, true ) end
  3. Castillo

    Question

    Both codes doesn't make much sense. for _, player in ipairs ( getPlayersInTeam ( getTeamFromName ( "LS" ) ) ) do giveWeapon ( player, 31, 500 ) giveWeapon ( player, 35, 20 ) giveWeapon ( player, 16, 20 ) givePlayerMoney ( player, 50000 ) end
  4. Wiki quote: local can = { } function start ( player ) if ( can.Command == true ) then setTimer ( stop, 5000, 1 ) can.Command = false outputChatBox ( "Can!", player, 255, 255, 255, true ) else outputChatBox ( "Can't!", player, 255, 255, 255, true ) end end addCommandHandler ( "test2", start ) function stop ( ) can.Command = true outputChatBox ( "Now Can Again!", root, 255, 255, 255, true ) end
  5. "My brother did it" that's the oldest excuse. There's no way you can change your serial, so stop asking.
  6. Castillo

    Help wanted

    You want to use it after the marker color has been set? if so: local topdeck = createMarker( 170, 255, 9.5, 'cylinder', 2.0, 255, 255, 255, 100 ) addEvent ( 'changecolor1topdeck', true ) addEventHandler ( 'changecolor1topdeck', getRootElement( ), function ( ) if ( getElementType ( source ) == "player" ) then local nR, nG, nB = getTeamColor ( getPlayerTeam ( source ) ) setMarkerColor ( topdeck, nR, nG, nB, 100 ) nana ( ) end end ) function nana ( ) local r1, g1, b1, a1 = getMarkerColor ( topdeck ) if ( r1 == 0 and g1 == 255 and b1 == 0 ) then outputChatBox ( '#FF0000[iNFO]: LOL Fail.', root, 255, 255, 255, true ) end end
  7. That's a table, not a variable. And you can remove all that [ source ] and leave it like this: local can = { } if can.command == true then -- all players can use this command else -- no all players can use this command end
  8. local welcomeText = "Hello World!" addEventHandler ( "onPlayerJoin", root, function ( ) outputChatBox ( welcomeText, source ) end ) That'll output the 'welcomeText' content to all players who join the server.
  9. onPlayerDamage cannot be cancelled. You can make yourself god mode with this ( runcode ): --Client side ( /crun ): addEventHandler ( "onClientPlayerDamage", localPlayer, cancelEvent )
  10. yea i know that -__- but like i said when i use his script other people see when i enabled godmode so i do /godmode and other 40 players see that i activated godmode but it doesnt show like HuX has enabled GodMode! it shows like GodMode is Enabled! i dont want that players see on chat when i use /godmode command It has to work, the only player argument you have is the one who used the command, and outputChatBox is set to output to that player, post your code.
  11. He's asking for DirectX ( DX ), not GUI. @KraZ: You can calculate the cursor position: getCursorPosition
  12. Castillo

    Help wanted

    Where do you execute the function: "nana" ?
  13. @Tony: En este caso deberias usar getPlayerFromName, pero la funcion que Yakuza posteo sirve tambien.
  14. Castillo

    Neon

    https://community.multitheftauto.com/ind ... ls&id=1833 That's the only public neon script.
  15. I'm not exactly sure of it's difference, but some times if you don't use it, some scripts may have not work, not all of them.
  16. If the XML is only used when the resource starts, then it won't be a problem I think.
  17. addEvent('changecolor1topdeck', true) addEventHandler('changecolor1topdeck', getRootElement( ), function( ) if ( getElementType ( source ) == "player" ) then local nR, nG, nB = getTeamColor( getPlayerTeam( source ) ) setMarkerColor( topdeck, nR, nG, nB, 100 ) end end )
  18. So, here we are fixing the script and it turns out it was a completely different thing, 'source' in your script is the player element, and 'thePlayer' is obviously nil.
  19. If they are random, then you should either make a function to choose the next map random at the start of the map, then set it as next map.
×
×
  • Create New...