Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Locking topic, if the creator is still working on this, send a PM to a moderator to unlock it.
  2. local validHelmets = { { "moto", "moto" }, { "helmet", "helmet" }, } addEventHandler ( "onClientVehicleEnter", root, function ( thePlayer ) if ( thePlayer == localPlayer ) then if ( getElementModel ( localPlayer ) == 0 and getVehicleType ( source ) == "Bike" ) then local texture, model = unpack ( validHelmets [ math.random ( #validHelmets ) ] ) addPedClothes ( localPlayer, texture, model, 16 ) end end end )
  3. That doesn't make any sense. What are you trying to do?
  4. Castillo

    mechanic

    Just like I thought, you're using the spawn system I made for a server, which got leaked by one of their staffs. Topic locked.
  5. I don't really get what you mean. You send the player element and compare it to the local player? that can also work, but I'm not sure if it's efficient.
  6. If you are using that same code in the client side, it won't work, because addCommandHandler has no player argument client side, use "localPlayer" instead at getElementPosition.
  7. triggerClientEvent("hideWindow", thePlayer) There's your problem, you are triggering the event for everyone. Change it to this: triggerClientEvent ( thePlayer, "hideWindow", thePlayer )
  8. Castillo

    mechanic

    You can send me part of the spawn system code over PM.
  9. Castillo

    mechanic

    What spawn system are you using?
  10. A ver si entendi, tenes dos teams, y cada team tiene sus vehiculos, y vos queres que solo los del team puedan usar sus vehiculos?
  11. The damage argument only works for client side explosions.
  12. No point in triggering it to all and then check if the source isn't the local player, he can simply specify in triggerClientEvent to who to trigger.
  13. Castillo

    mechanic

    Which is why this doesn't work, your class must be "Mechanic" to work.
  14. Castillo

    mechanic

    local allowedClass = { [ "Mechanic" ] = true } function fix ( player ) outputChatBox ( "Your class is: ".. tostring ( getElementData ( player, "class" ) ), player ) if ( allowedClass [ getElementData ( player, "class" ) ] ) then local price = ( 1001 - getElementHealth ( source ) ) givePlayerMoney ( player, price * 20 ) fixVehicle ( source ) outputChatBox ( "You have fixed this car", player, 0, 255, 0 ) end end addEventHandler ( "onVehicleEnter", getRootElement(), fix ) See what it outputs to chatbox when you enter a vehicle.
  15. Castillo

    mechanic

    Any errors in debugscript?
  16. Show the code that triggers the event: "hideWindow".
  17. Castillo

    mechanic

    local allowedClass = { [ "Mechanic" ] = true } function fix ( player ) if ( allowedClass [ getElementData ( player, "class" ) ] ) then local price = ( 1001 - getElementHealth ( source ) ) givePlayerMoney ( player, price * 20 ) fixVehicle ( source ) outputChatBox ( "You have fixed this car", player, 0, 255, 0 ) end end addEventHandler ( "onVehicleEnter", getRootElement(), fix )
  18. We don't give support with leaked scripts. Topic locked.
  19. The scoreboard by default, it has no country flags, there are some resources which adds them, but you must ask the person who added this to change it, or you could change it yourself, as you just need to change a single image file.
  20. Creating vehicles client side will make the vehicle unusable.
×
×
  • Create New...