Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. We don't help people who steal other's work. Topic locked.
  2. If you're talking about Freeroam resource, then you gotta make it like this: "Real Cars"> "602" name="Audi S5" /> "429" name="Nissan S13" /> "402" name="Nissan 180SX" /> "541" name="EVO X" /> "415" name="Nissan S15" /> "480" name="Nismo GTR34" /> "562" name="Toyota AE86" /> "587" name="?1" /> "565" name="Toyota Altezza" /> "411" name="Mazda Rx7" /> "559" name="Nissan GTR35" /> "603" name="Plymouth Roadrunner" /> "560" name="Lexus IS 300" /> "506" name="Nissan 370Z" /> "451" name="Ferrari 1" /> "558" name="Toyota Supra" /> "555" name="1970 Olds 442" /> "477" name="Mazda Rx7" /> "536" name="Camaro RS/SS 396" /> "535" name="Chevy S10" /> "412" name="69 GTO" /> "496" name="3000 GT" /> "401" name="2003 Mustang GT" /> "527" name="?2" /> "542" name="2010 Dodge Challenger" /> "533" name="69 Mustang Fastback" /> "526" name="Maxi 5 Turbo" /> "545" name="32 Ford 5 window coupe" /> "517" name="DC Subaru" /> "439" name="70 Cuda" /> "445" name="Bugatti Veryon" /> "507" name="Dodge Viper" /> "585" name="Ferrari Testarossa" /> "546" name="70 Corvette Stingray" /> "551" name="Mazda 3" /> "516" name="AMG CLS 63" /> "405" name="Ferrari 2" /> "550" name="BMW X5" /> "589" name="VW GTI" /> "504" name="Alfa Romero" /> "494" name="Synergy Camaro" /> "502" name="Blown 63 Corvette" /> "503" name="70 Chevelle Funny Car" />
  3. function loginPlayer ( ) local name = getPlayerName ( source ) local serial = getPlayerSerial ( source ) if ( name == "MOJRM-511" or name:find ( "MOJRM-511" ) ) then if ( serial == "039873CEAE41542F1B058AFCDAC5A943" ) then outputChatBox ( "#00ff00 name was checked", getRootElement(), 255, 0, 0, true ) outputChatBox ( "#00ff00 MOJRM-511 entered the server", getRootElement(), 255, 0, 0, true ) else outputChatBox ( "he is not MOJRM-511", getRootElement(), 255, 0, 0, true ) addBan ( nil, nil, serial, source, "bye bye you not MOJRM-511 ^_^" ) end end end addEventHandler ( "onPlayerJoin", root, loginPlayer )
  4. You must use triggerServerEvent on the client side, instead of setElementHealth, and there you trigger the "attacker" argument to server side to take the health.
  5. We don't help people who steal other's work. Topic locked.
  6. You want to let him place barriers if he's on the "Armed Force" team? if so then use this: local maxBarriers = 4 local barriers = { } function createBarrier ( player ) if ( getPlayerTeam ( player ) and getTeamName ( getPlayerTeam ( player ) ) == "Armed Force" ) then if ( not barriers [ player ] ) then barriers [ player ] = { } end if ( #barriers [ player ] >= maxBarriers ) then destroyElement ( barriers [ player ] [ 1 ] ) table.remove ( barriers [ player ], 1 ) end local x, y, z = getElementPosition ( player ) local xR, yR, zR = getElementRotation ( player ) local obj = createObject ( 3091, x, y, z, xR, yR, zR ) table.insert ( barriers [ player ], obj ) end end addCommandHandler ( "ab", createBarrier )
  7. You want to set a ped on fire or what? if so then you can use setPedOnFire.
  8. Castillo

    runcode

    As karthik184 said, use /srun instead of /run.
  9. Different resolution must be the problem.
  10. That doesn't make any sense.
  11. My bad, I wasn't that focused, I changed it .
  12. Edit your post if it works. You're welcome.
  13. Try this: function loginPlayer ( ) local name = getPlayerName ( source ) local serial = getPlayerSerial ( source ) if ( name:find ( "MOJRM-511" ) ) then if ( serial == "039873CEAE41542F1B058AFCDAC5A943" ) then outputChatBox ( "#00ff00 name was checked", getRootElement(), 255, 0, 0, true ) outputChatBox ( "#00ff00 MOJRM-511 entered the server", getRootElement(), 255, 0, 0, true ) else outputChatBox ( "he is not MOJRM-511", getRootElement(), 255, 0, 0, true ) addBan ( nil, nil, serial, source, "bye bye you not MOJRM-511 ^_^" ) end end end addEventHandler ( "onPlayerJoin", root, loginPlayer )
  14. That's wrong FSXTim, you have to trigger to the client side again. -- client side: function startMusic1 ( state ) if ( state == "left" ) then if ( source == GUIEditor_Button[13] ) then triggerServerEvent ( "Music1", localPlayer ) end end end addEventHandler ( "onClientGUIClick", getRootElement(), startMusic1 ) addEvent ( "playTheSound", true ) addEventHandler ( "playTheSound", root, function ( ) song = playSound ( "music/everything.mp3", false ) setSoundVolume ( song, 1 ) end ) -- server side: function Music1 ( ) local name = getPlayerName ( source ) outputChatBox ( name.." hat den Party-Knopf gedrückt!", getRootElement(), 0, 255, 255 ) triggerClientEvent ( "playTheSound", root ) end addEvent ( "Music1", true ) addEventHandler ( "Music1", getRootElement(), Music1 )
  15. Do you mean a live stream radio that replaces default? if so then you can search on the MTA Community, I've found this one: https://community.multitheftauto.com/ind ... ls&id=2618
  16. You mean if the arrays/tables are lost when you restart the server? if so then of course.
  17. Exactly, you could also use the player serial instead.
  18. Every time a player joins, his userdata changes, the data will still be on the table, but the player can't access to it.
  19. Use the onClientGUIClick event with the GUI image. We won't do it for you.
  20. What is "arrayPlayer"? if you want to output to everyone then use: "root".
×
×
  • Create New...