Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. -- client side: function rocket ( boss, player ) local x, y, z = getElementPosition ( boss ) createProjectile ( boss, 19, x, y, z, 100, player ) end addEvent ( "onBOSSFire", true ) addEventHandler ( "onBOSSFire", getRootElement(), rocket ) -- server side: function spawnboss ( player ) boss = exports.zombies:createZombie ( 241.96803283691, 1393.2790527344, 10.5859375, 90, math.random ( 300, 304 ), 0, 0, 200, 10000, true ) giveWeapon ( boss, 36, 300 ) triggerClientEvent ( root, "onBOSSFire", root, boss, player ) end addCommandHandler ( "b", spawnboss )
  2. You mean to kill a player? if so: killPed
  3. You can create one when resource start.
  4. Well, the difference is, that e.g, you want to write on a file via scripting functions, if you are using a zip, you won't be able to do that.
  5. You are spawning one bot when another dies, and the other 10 bots, you want to spawn them when a slothbot spawns.
  6. Castillo

    Resource Bugs

    Do you get an error? and the chat box output is working?
  7. The resource: "reload" triggers "onPlayerReload" to reload the weapon ( server side event ), is not an event triggered by MTA, but by the script.
  8. Yes, since a long time.
  9. onPlayerDamage outputChatBox
  10. Castillo

    Ayuda

    Marker = createMarker ( 1294.7626953125, -1379.625, 13.486034584045, "corona", 1.5, 90, 253, 70, 163 ) function check ( thePlayer ) if ( isElementWithinMarker ( thePlayer, Marker ) ) then local money = getPlayerMoney ( thePlayer ) if ( money >= 1000 ) then setPedArmor ( thePlayer, 10 ) else outputChatBox ( "No tienes Dinero para comprar Armor!", thePlayer, 8, 224, 13 ) end end end function decir ( hitElement ) if ( getElementType ( hitElement ) == "player" ) then if ( not isPedInVehicle ( hitElement ) ) then if ( eventName == "onMarkerHit" ) then outputChatBox ("Preciona Z para comprar el armor!", hitElement, 8, 224, 13 ) bindKey ( hitElement, "z", "down", check ) else unbindKey ( hitElement, "z", "down", check ) end end end end addEventHandler ( "onMarkerHit", Marker, decir ) addEventHandler ( "onMarkerLeave", Marker, decir )
  11. Too bad it looks exactly like SAUR's, which has it since a long time.
  12. Castillo

    radar help

    We don't give support with stolen scripts. Topic locked.
  13. I'll lock the topic, for what it seems, kranchof, you aren't reading what people tell you.
  14. No, he was just asking how to make a colshape like the one in his image.
  15. Why would he use a table?
  16. function KickDM ( _, attacker ) if ( attacker ) then if ( getElementType ( attacker ) == "player" ) then outputChatBox ( getPlayerName ( attacker ) .. " have been kicked for DM!", root, 250, 60, 60, true ) kickPlayer ( attacker, "You have been kicked for killing another player" ) end end end addEventHandler ( "onPlayerWasted", root, KickDM ) outputChatBox has to go first, if you do it after kickPlayer, it'll say that expected a player element, but got nil at getPlayerName.
  17. Well, it'll appear that he got kicked.
  18. Well, the only way to make the player quit by scripting functions is to kick him, as far as I know. kickPlayer
  19. You set the script as server side, right?
  20. Did the script work? I didn't test it myself.
  21. local playerData = { } -- Define a table function saveWarp ( playerSource ) local vehicle = getPedOccupiedVehicle ( playerSource ) playerData [ playerSource ] = -- Add the player who used the command to the table, and insert the position, rotation, speed { position = { getElementPosition ( vehicle ) }, rotation = { getElementRotation ( vehicle ) }, speed = { getElementVelocity ( vehicle ) } } outputChatBox ( "The Warp has been saved!", playerSource ) end addCommandHandler ( "sw", saveWarp ) function loadWarp ( playerSource ) local data = playerData [ playerSource ] -- Check if the player is on the table. if ( data ) then -- If he/she is... local vehicle = getPedOccupiedVehicle ( playerSource ) setElementFrozen ( vehicle, true ) setElementPosition ( vehicle, unpack ( data.position ) ) -- Set the position to the value stored on the table. setElementRotation ( vehicle, unpack ( data.rotation ) ) -- Set the rotation to the value stored on the table. setTimer ( setFreeze, 3000, 1, vehicle, data.speed ) -- Pass the speed data to the "setFreeze" function. outputChatBox ( "The Warp has been loaded!", playerSource ) end end addCommandHandler ( "lw", loadWarp ) function setFreeze ( vehicle, speed ) if ( vehicle ) then setElementFrozen ( vehicle, false ) setElementVelocity ( vehicle, unpack ( speed ) ) end end Read the comments.
  22. -- client side: function fakeBomb ( x, y, z ) createExplosion ( x, y, z, 0, true, -1.0, false ) end addEvent ( "fakeBomb", true ) addEventHandler ( "fakeBomb", getRootElement(), fakeBomb ) -- server side: local zone = createColSphere( 1588.1999511719, -1638.5, 15.10000038147, 15.0 ) function shapeHit ( hitPlayer ) triggerClientEvent ( root, "fakeBomb", root, getElementPosition ( hitPlayer ) ) end addEventHandler( 'onColShapeHit', zone, shapeHit )
×
×
  • Create New...