Jump to content

Martyz

Members
  • Posts

    102
  • Joined

  • Last visited

Everything posted by Martyz

  1. triggerEvent triggerClientEvent triggerServerEvent
  2. Any debugscript errors?
  3. Then you should use UPDATE: mysql_query(handler, "UPDATE accounts SET x=" .. x .. ", y=" .. y .. ", z=" .. z .. " WHERE login='" .. accName .. "'")
  4. Do you want to update data in mysql or insert new row?
  5. Martyz

    createWater

    Hello, I've some very strange problem with createWater. This line doesn't create water: createWater(635, -229, 12, 613, -229, 12, 635, -294, 12, 613, -294, 12) Code is 100% ok and it doesn't show any errors, but this createWater function returns false. When I tried to change coordinates to ones from wiki(createWater) example, it worked (returns water element). I've been checking every symbol i wrote in this line for ten minutes, but didn't find any faults. Is this function bugged or maybe I use this function wrong? Btw, I've tried client-side and server-side, but it returns the same problem.
  6. U failed a bit with variables here, but ye, that's looks the best way to do it, but anyways, I hope MTA team will fix onVehicleExit.
  7. Ye, I've knew this way to do it, but I thought there is some another simple function/event which I didn't notice, but big thanks for you anyways !
  8. Martyz

    Phone

    That url wasn't needed. Depends on what kind of "phone" you want to make in-game, DX or GUI. Why not? He didn't write anything exact.
  9. Martyz

    Phone

    https://forum.multitheftauto.com/viewtopic.php?f=91&t=47897
  10. Hello, the question is: how to get vehicle the player died in. onPlayerVehicleExit, onVehicleStartExit, onVehicleExit events don't get called when player dies while he is in the vehicle. Also getPedOccupiedVehicle returns false in onPlayerWasted event. Maybe there is some another way to get the car? The reason why I need it, I need to set vehicle dimension to 0 when player exits vehicle.
  11. So you get the exact error?
  12. Where is the 2nd argument of the function createBlipAttachedTo. only 1 argument is required, others are optional You can use onPlayerQuit for that, you dont need timer.
  13. You just copied his wrong script and added to onClientResourceStart handler. My script is fine, it will work if he place it correctly
  14. are you destroying blue color?
  15. add this to client script file: function onClFire() if(getElementModel(source) == 31) then -- M4 if(getElementData(getLocalPlayer(),"levelnum" < 3)) then cancelEvent() outputChatBox('You cant use M4') end -- if level is lower than 3 (100exp), cancel shooting and send message elseif(getElementModel(source) == 34) then -- Sniper if(getElementData(getLocalPlayer(),"levelnum" < 4)) then cancelEvent() outputChatBox('You cant use Sniper') end -- if level is lower than 4 (200exp), cancel shooting and send message end end addEventHandler('onClientWeaponFire', getRootElement, onClFire)
  16. didn't test, but should work: blip = {} function spawn(posX, posY, posZ, spawnRotation, theTeam, theSkin, theInterior, theDimension) if(not isElement(blip[getPlayerName(source)])) then blip[getPlayerName(source)] = createBlipAttachedTo(source) end if(getTeamName(theTeam) == 'test') then local r, g, b = getTeamColor(theTeam) setPlayerNametagColor(source, r, g, b) setBlipColor(blip[getPlayerName(source)], r, g, b, 255) end end addEventHandler('onPlayerSpawn', getRootElement(), spawn) this is server-side script !
  17. you made a mistake by placing ); but you dont need to create new function to use only one setTimer(triggerServerEvent, 3000, 1, "onStart", getLocalPlayer())
×
×
  • Create New...