SkatCh

Members
  • Content Count

    366
  • Joined

  • Last visited

Community Reputation

0 Neutral

About SkatCh

  • Rank
    Street Cat

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. This topic is really very useful
  2. SkatCh

    Local voice chat

    Lol i already gave you the solution did u even try it .
  3. SkatCh

    Local voice chat

    Maybe you can change dxDrawVoice distance to something like that local local_Voice_range = 50 then you can ad this if (getDistanceBetweenPoints3D(camX, camY, camZ, headX, headY, headZ)<= local_Voice_range) then -- Your code here
  4. are you sure it's working fine local screenW,screenH = guiGetScreenSize() local resW, resH = 1280, 720 local cx, cy = (screenW/resW), (screenH/resH) local stats = {69,73,78,70,74,77,71,72,75,76,79,23} function Test ( ) for i, v in ipairs (stats) do check = getPedStat (localPlayer,tonumber(v)) end dxDrawText (check.."%", cx*69, cy*505, cx*150, cy*10, tocolor ( 0, 0, 0, 200 ), 1,"default-bold","left","top",false,false,false, true) dxDrawText (check , cx*68, cy*504, cx*150, cy*10, tocolor ( 255, 165, 0, 255 ), 1,"default-bold","left","top",false,false,false, true) end addEventHandler("onClientRender", root, Test) i can see it near to the radar
  5. do it like this -- Client side function playSoundLock(x,y,z) local sound = playSound3D("lock.wav",x,y,z) setSoundMaxDistance(sound, 100 ) end addEvent("onvehiclelock",true) addEventHandler("onvehiclelock",getRootElement(),playSoundLock) function playSoundUnlock(x,y,z) local sound = playSound3D("unlock.wav",x,y,z) setSoundMaxDistance(sound, 100 ) end addEvent("onvehicleunlock",true) addEventHandler("onvehicleunlock",getRootElement(),playSoundUnlock) -- server side function lockcar ( thePlayer ) local vehicle = getPedOccupiedVehicle ( thePlayer ) if ( vehicle ) then vehposx,vehposy,vehposz = getElementPosition(vehicle) if isVehicleLocked ( vehicle ) then setVehicleLocked ( vehicle, false ) triggerClientEvent(thePlayer,"onvehicleunlock",thePlayer,vehposx,vehposy,vehposz) outputChatBox("Your "..getVehicleName(vehicle).." have been unlocked", thePlayer,0,255,0) else setVehicleLocked ( vehicle, true ) triggerClientEvent(thePlayer,"onvehiclelock",thePlayer,vehposx,vehposy,vehposz) outputChatBox("Your "..getVehicleName(vehicle).." have been locked", thePlayer,0,255,0) end end end addCommandHandler("lock",lockcar)
  6. Why you change it copy and past my code local stats = {69,73,78,70,74,77,71,72,75,76,79,23} for i, v in ipairs (stats) do check = getPedStat (localPlayer,tonumber(v)) end dxDrawText (check.."%", cx*69, cy*505, cx*150, cy*10, tocolor ( 0, 0, 0, 200 ), 1,"default-bold","left","top",false,false,false, true) dxDrawText (check , cx*68, cy*504, cx*150, cy*10, tocolor ( 255, 165, 0, 255 ), 1,"default-bold","left","top",false,false,false, true)
  7. How about you try to do it yourself? If you fail we can help you with your code.
  8. i think you need something like this local stats = {69,73,78,70,74,77,71,72,75,76,79,23,} for i , v in ipairs (stats) do check = getPedStat (localPlayer,tonumber(v))/1000 end
  9. The table isn't numeric index therefore you should use pairs instead of ipairs. about your question k = iteration number v = value of the table it can be also like this -- i or k it's the same for i , v in pairs (getElementsByType("vehicle")) do -- i is the index and v it's value -- for pairs instead of "i" I usually use "k" wich means key (of the value).