-
Posts
1,412 -
Joined
-
Last visited
-
Days Won
2
Posts posted by WASSIm.
-
-
1- how make if player have nitro show icon
2- how make if lights on show icon
like this:
addEventHandler( "onClientRender", root, function light () local theVehicle = getPedOccupiedVehicle ( localPlayer ) if ( isVehicleLocked( theVehicle ) ) then dxDrawImage(0,0,0,0,"images/lock.png",0.0,20,20,tocolor(250,255,255,255),false) else dxDrawImage(0,0,0,0,"images/lock.png",0.0,20,20,tocolor(0,0,0,170),false) end
-
-
local sx,sy = guiGetScreenSize() local playerHealth = getElementHealth ( getLocalPlayer() ) local playerArmor = getPlayerArmor (getLocalPlayer()) local hour, minutes = getTime(getLocalPlayer()) local money = getPlayerMoney(getLocalPlayer() ) local wanted = getPlayerWantedLevel ( getLocalPlayer() ) addEventHandler( "onClientRender", getRootElement(), function () -------------------- health hx1, hy1, hx2, hy2 = sx*(1205.0/1440),sy*(157.0/900),sx*(232.0/1440),sy*(27.0/900) hx3, hy3, hx4, hy4 = sx*(1209.0/1440),sy*(161.0/900),playerHealth*sx*(224.0/1440)/100,sy*(19.0/900) hx5, hy5, hx6, hy6 = sx*(1302.0/1440),sy*(150.0/900),sx*(40.0/1440),sy*(40.0/900) -------------------- Armor ax1, ay1, ax2, ay2 = sx*(1205.0/1440),sy*(197.0/900),sx*(232.0/1440),sy*(27.0/900) ax3, ay3, ax4, ay4 = sx*(1209.0/1440),sy*(201.0/900),playerArmor*sx*(224.0/1440)/100,sy*(19.0/900) ax5, ay5, ax6, ay6 = sx*(1310.0/1440),sy*(202.0/900),sx*(23.0/1440),sy*(20.0/900) --------------------time tx1, ty1, tx2, ty2 = sx*(1205.0/1440),sy*(235.0/900),sx*(232.0/1440),sy*(27.0/900) tx5, ty5, tx6, ty6 = sx*(1310.0/1440),sy*(238.0/900),sx*(20.0/1440),sy*(20.0/900) --------------------money mx1, my1, mx2, my2 = sx*(1205.0/1440),sy*(275.0/900),sx*(232.0/1440),sy*(27.0/900) mx5, my5, mx6, my6 = sx*(1310.0/1440),sy*(278.0/900),sx*(20.0/1440),sy*(20.0/900) --------------------wanted wx1, wy1, wx2, wy2 = sx*(1205.0/1440),sy*(315.0/900),sx*(232.0/1440),sy*(27.0/900) wx5, wy5, wx6, wy6 = sx*(1310.0/1440),sy*(314.0/900),sx*(20.0/1440),sy*(20.0/900) local currenthealth = math.floor(playerHealth) local currentarmor = math.floor(playerArmor) if ( playerHealthcolor ) then HealthColor = math.max(playerHealth - 250, 0)/750 HealthColorMath = -510*(HealthColor^2) rh, gh = math.max(math.min(HealthColorMath + 255*HealthColor + 255, 255), 0), math.max(math.min(HealthColorMath + 765*HealthColor, 255), 0) end if ( playerArmorcolor ) then ArmorColor = math.max(playerArmor - 250, 0)/750 ArmorColorMath = -510*(ArmorColor^2) ra, ga = math.max(math.min(ArmorColorMath + 255*ArmorColor + 255, 255), 0), math.max(math.min(ArmorColorMath + 765*ArmorColor, 255), 0) end if ( playerHealth ) then dxDrawRectangle(hx1, hy1, hx2, hy2,tocolor(0,0,0,150),false) dxDrawRectangle(hx3, hy3, hx4, hy4,tocolor(rh,gh,0,170),false) dxDrawImage(hx5-150, hy5+1, hx6, hy6,"images/health.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) dxDrawText(""..tostring(currenthealth).."%",hx3+100, hy3-2, hx4, hy4,tocolor(255,255,255,255),1.6,"sans","left","top",false,false,false) end if ( playerArmor ) then dxDrawRectangle(ax1, ay1, ax2, ay2,tocolor(0,0,0,150),false) dxDrawRectangle(ax3, ay3, ax4, ay4,tocolor(ra,ga,0,170),false) dxDrawImage(ax5-150, ay5+1, ax6, ay6,"images/armor.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) dxDrawText(""..tostring(currentarmor).."%",ax3+100, ay3-2, ax4, ay4,tocolor(255,255,255,255),1.6,"sans","left","top",false,false,false) end if ( hour ) then dxDrawRectangle(tx1, ty1, tx2, ty2,tocolor(0,0,0,150),false) dxDrawImage(tx5-150, ty5+1, tx6, ty6,"images/time.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) dxDrawText(""..tostring(hour)..":"..tostring(minutes).."",tx1+100, ty1+2, tx2, ty4,tocolor(255,255,255,255),1.6,"sans","left","top",false,false,false) end if ( money ) then dxDrawRectangle(mx1, my1, mx2, my2,tocolor(0,0,0,150),false) dxDrawImage(mx5-150, my5+1, mx6, my6,"images/money.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) dxDrawText("$"..tostring(money).."",mx1+100, my1+2, mx2, my4,tocolor(255,255,255,255),1.6,"sans","left","top",false,false,false) end if ( wanted ) then dxDrawRectangle(wx1, wy1, wx2, wy2,tocolor(0,0,0,150),false) dxDrawImage(wx5-150, wy5+1, wx6, wy6,"images/health.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) dxDrawText(""..tostring(wanted).."",wx1+100, wy1+2, wx2, wy4,tocolor(255,255,255,255),1.6,"sans","left","top",false,false,false) end end )
-
hi guys i have problem
idk why show me my helth if restart script and Rectangle move and dont change color and if change dxDrawText in center show me in center screen
local playerHealth = getElementHealth ( getLocalPlayer() ) addEventHandler( "onClientRender", getRootElement(), function () local currenthealth = math.floor(playerHealth) if ( playerHealthcolor ) then HealthColor = math.max(playerHealth - 250, 0)/750 HealthColorMath = -510*(HealthColor^2) rh, gh = math.max(math.min(HealthColorMath + 255*HealthColor + 255, 255), 0), math.max(math.min(HealthColorMath + 765*HealthColor, 255), 0) end if ( playerHealth ) then dxDrawRectangle(hx1, hy1, hx2, hy2,tocolor(0,0,0,150),false) dxDrawRectangle(hx3, hy3, hx4, hy4,tocolor(rh,gh,0,170),false) dxDrawImage(hx5-150, hy5+1, hx6, hy6,"images/health.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) dxDrawText(""..tostring(currenthealth).."%",hx3+100, hy3-2, hx4, hy4,tocolor(255,255,255,255),1.6,"sans","left","top",false,false,false) end end )
-
local x, y, z = 1289.0939941406, -1647.5231933594, 12.546875 mar = createMarker(x, y, z, "Cylinder", 1.8, 0, 0, 57, 150) exports.customblips:createCustomBlip ( x, y, 10, 10, "icon.png" )
-
-
-
you need this for auto open/close gate
createMarker or createColCircle
-
-
fahamni 3andhom board yetfehmou fih fech jey ennayek linna.
tar9 jma3a ili fi board mta3hom kifou
-
local myGate1 = createObject ( 980, 1278.5, -1651.8000488281, 15.300000190735, 0, 0, 270 ) local marker = createMarker( -713.90002441406, 973.20001220703, 14, "cylinder", 10, 255, 255, 255, 0) function openMyGate ( ) if (getElementData(source, "gang") == "SWAT") then moveObject ( myGate1, 2500, 1278.5, -1651.8000488281, 9.8000001907349 ) end end addEventHandler("onMarkerHit", marker, openMyGate) function movingMyGateBack () if (getElementData(source, "gang") == "SWAT") then moveObject ( myGate1, 2500, 1278.5, -1651.8000488281, 15.300000190735 ) end end addEventHandler("onMarkerLeave", marker, movingMyGateBack)
-
try this:
local myGate1 = createObject ( 980, 1278.5, -1651.8000488281, 15.300000190735, 0, 0, 270 ) function openMyGate ( ) if (getElementData(source, "gang") == "SWAT") then moveObject ( myGate1, 2500, 1278.5, -1651.8000488281, 9.8000001907349 ) end end addCommandHandler("openadm",openMyGate) function movingMyGateBack () if (getElementData(source, "gang") == "SWAT") then moveObject ( myGate1, 2500, 1278.5, -1651.8000488281, 15.300000190735 ) end end addCommandHandler("closeadm",movingMyGateBack)
-
-
-
-
-
If that's what he wants, then this should do:
function skinstaff ( ) local team = getPlayerTeam ( localPlayer ) if ( team and getTeamName ( team ) == "STAFF" ) then local skin1 = dxCreateTexture ( "images/wfyclot.jpg", "dxt5" ) local skin2 = dxCreateTexture ( "images/wmyclot.jpg", "dxt5" ) local shader1 = dxCreateShader ( "texture.fx" ) local shader2 = dxCreateShader ( "texture.fx" ) dxSetShaderValue ( shader1, "gTexture", skin1 ) dxSetShaderValue ( shader2, "gTexture", skin2 ) engineApplyShaderToWorldTexture ( shader1, "wfyclot" ) engineApplyShaderToWorldTexture ( shader2, "wmyclot" ) end end addEventHandler ( "onClientResourceStart", resourceRoot, skinstaff )
not work
-
hi guys
plis help idk what problem
CLIENT
function skinstaffoff ( ) local skin1 = dxCreateTexture ( "images/wfyclotoff.jpg", "dxt5" ) local skin2 = dxCreateTexture ( "images/wmyclotoff.jpg", "dxt5" ) local shader1 = dxCreateShader ( "texture.fx" ) local shader2 = dxCreateShader ( "texture.fx" ) dxSetShaderValue ( shader1, "gTexture", skin1 ) dxSetShaderValue ( shader2, "gTexture", skin2 ) engineApplyShaderToWorldTexture ( shader1, "wfyclot" ) engineApplyShaderToWorldTexture ( shader2, "wmyclot" ) end addEventHandler ( "onClientResourceStart", resourceRoot, skinstaffoff) function skinstaff ( ) triggerEvent ("onserverteam", source, onserverteam) local skin1 = dxCreateTexture ( "images/wfyclot.jpg", "dxt5" ) local skin2 = dxCreateTexture ( "images/wmyclot.jpg", "dxt5" ) local shader1 = dxCreateShader ( "texture.fx" ) local shader2 = dxCreateShader ( "texture.fx" ) dxSetShaderValue ( shader1, "gTexture", skin1 ) dxSetShaderValue ( shader2, "gTexture", skin2 ) engineApplyShaderToWorldTexture ( shader1, "wfyclot" ) engineApplyShaderToWorldTexture ( shader2, "wmyclot" ) end addEventHandler ( "onClientResourceStart", resourceRoot, skinstaff)
function onserverteam ( ) if ( getTeamName(getPlayerTeam(source)) == "STAFF" ) then end end addEvent("onserverteam",true) addEventHandler("onserverteam", resourceRoot, onserverteam)
-
i dont think anyone will host it for free but you can get a 32slot server for just as little as 5usd
i cant host server my from tunisia
-
hi guys and mta team
plis can make MTA to gta iv i like server rpg to gta iv its very cool
-
1
-
-
HI Guys
If who want can host server zombie i have scripts very good and forum very nice
Loading Scripts: 89%
Name Server: GTA Zombie Attack
ZA Team:
WASSIm.
Hight Staff:
Etho
STAFF
None
Trial Staff:
None
-
if want make 3 server change ports like this
SERVER 1
22002
22005
22125
SERVER 2
22003
22006
22126
SERVER 2
22004
22007
22127
-
-
client:
addEventHandler("onClientVehicleEnter", root, function(thePlayer, seat) local theVehicle = source if seat == 0 and thePlayer == localPlayer and getElementModel(theVehicle) == 601 then x, y, z = getElementPosition ( theVehicle ) rx, ry, rz = getElementRotation ( theVehicle ) minigunOne = createWeapon ( "minigun", x, y, z ) setElementAlpha ( minigunOne,0) attachElements ( minigunOne, theVehicle, 0.15, 0, 1.3, 0, 0, 93 ) bindKey ( "mouse1", "down", enableFire ) bindKey ( "mouse1", "up", disableFire ) end end ) addEventHandler("onClientVehicleExit", root, function(thePlayer, seat) local theVehicle = source if seat == 0 and thePlayer == localPlayer and getElementModel(theVehicle) == 601 then if minigunOne then destroyElement (minigunOne) unbindKey ( "mouse1", "down", enableFire ) unbindKey ( "mouse1", "up", disableFire ) end end end ) function enableFire() if isTimer(MGtimer) and minigunOne then killTimer(MGtimer) else MGtimer = setTimer(function() setWeaponState ( minigunOne, "firing" ) end, 50, 1) MiniSound = playSound( "Pro_Minigun.wav", true) setSoundVolume(MiniSound, 0.4) setSoundSpeed ( MiniSound, 0.9 ) end end function disableFire() if isTimer(MGtimer) and minigunOne then killTimer(MGtimer) else MGtimer = setTimer(function() setWeaponState ( minigunOne, "ready" ) end, 50, 1) stopSound ( MiniSound ) end end function mgRotate () if minigunOne then triggerServerEvent ("mgserver", source, mgserver) setElementRotation(minigunOne,rotX,rotY,rotZ) end end addEventHandler ( "onClientRender", root, mgRotate )
i want rotation getCameraMatrix not rotation car
help
in Scripting
Posted · Edited by Guest
aa thx but Rectangle dont change color