-
Posts
708 -
Joined
-
Last visited
Everything posted by K4stic
-
blipbtn = guiCreateButton(22, 422, 110, 30, "setBlip", false, window) addEventHandler("onClientGUIClick", root, function (player) if (source == blipbtn) and (source == Blip) then local player = guiGridListGetItemText (playersgrid, guiGridListGetSelectedItem (playersgrid), 1) local Blip = createBlipAttachedTo ( player, 22 ) end end )
-
this must work blipbtn = guiCreateButton(22, 422, 110, 30, "setBlip", false, window) addEventHandler("onClientGUIClick", root, function () if (source == blipbtn) then local player = guiGridListGetItemText (playersgrid, guiGridListGetSelectedItem (playersgrid), 1) local Blip = createBlipAttachedTo ( player, 22 ) end end )
-
if not work my previus try this: blipbtn = guiCreateButton(22, 422, 110, 30, "setBlip", false, window) addEventHandler("onClientGUIClick", root, function (player) if (source == Blip) then local player = guiGridListGetItemText (playersgrid, guiGridListGetSelectedItem (playersgrid), 1) local Blip = createBlipAttachedTo ( player, 22 ) end end )
-
is no attach the blip or just you see the error?
-
Try this: blipbtn = guiCreateButton(22, 422, 110, 30, "setBlip", false, window) addEventHandler("onClientGUIClick", root, function (player) if (source == blip) then local player = guiGridListGetItemText (playersgrid, guiGridListGetSelectedItem (playersgrid), 1) local Blip = createBlipAttachedTo ( player, 22 ) end end )
-
Trollolol i only ask help nothing else if you thing tosring not will work post code that who you think will work i will test the script then i will have 2 players
-
Cool map! I love it
-
To replace the object worlds need make .dff and .txd and .col to be work fine else will make it crash
-
says on line 12: attempt to concatenate a boolean value --Server side function sortTimerj(plr,timer,time) if timer and time then if isTimer(timerjTimer) then killTimer(timerjTimer) end timerjTimer = setTimer(function(plr) time = time - 70 m,s,cs = msToTimeStr(time) fullTime = m..":"..s textItemSetText(timer,"Time Left : "..tostring(fullTime).."") if plr then setElementData(getResourceRootElement(getThisResource()),""..getPlayerSerial(plr).."-t",time) end if ( tonumber(m) <= 0 and tonumber(s) <= 0 and tonumber(cs) <= 0 ) then onTimerFinish(plr,timer) end end , 50 , 0 ,plr ) end end
-
here: addEventHandler ( "onClientGUIClick", here add button name, randomVehColors, false )
-
no work here full code local playerBlipRoot = createElement("playerBlipRoot", "playerBlipRoot") function resourceStart() for _, player in ipairs(getElementsByType("player")) do if player ~= localPlayer then local r,g,b = getTeamColor(getPlayerTeam(player)) local blip = createBlipAttachedTo(player, 0, 2, r,g,b, 255, 1) setElementParent(blip, playerBlipRoot) end end end addEventHandler("onClientResourceStart", root, resourceStart) function playerJoin() local r,g,b = getTeamColor(getPlayerTeam(source)) local blip = createBlipAttachedTo(source, 0, 2, r,g,b, 255, 1) setElementParent(blip, playerBlipRoot) setTimer(updateBlipColor, 1500, 1, blip) end addEventHandler("onClientPlayerJoin", root, playerJoin) function playerQuit() for _, blip in ipairs(getElementChildren(playerBlipRoot)) do if getElementAttachedTo(blip) == source then destroyElement(blip) end end end addEventHandler("onClientPlayerQuit", root, playerQuit) function updateBlipColor ( player ) local attachedblip = getElementAttachedTo ( player ) if ( attachedblip ) then local r,g,b = getTeamColor ( getPlayerTeam( player ) ) setBlipColor(attachedblip, r,g,b, 255) end end --setTimer(updateBlipColor, 1000, 0)
-
this script is mine script who you find in community and link: https://community.multitheftauto.com/index.php?p= ... ls&id=6198 and i will help you! --Client side time1 = setTimer( function ( ) for _, vehicle in ipairs ( getElementsByType ( "vehicle" ) ) do if getElementHealth(vehicle) < 260 then setVehicleDamageProof( vehicle, true) time2 = setTimer( blowVehicle ( vehicle ), 500000, 0) else if getElementHealth(vehicle) >= 299 then setVehicleDamageProof( vehicle, false) killTimer ( time2 ) end end end end, 1000, 0)
-
1. how charge to the scale for object's be differend but only for this table i know the code for scale is "setObjectScale ( object, scale )" local aObjects = { { "Hat 1", 2052 }, --scale 1 { "Hat 2", 2053 }, --scale 1 { "Hat 3", 2054 }, --scale 1 { "Grass Hat", 861 },--scale 0.9 { "Grass Hat 2", 862 }, --scale 0.9 { "Flag hat", 2993 }, --scale 1 { "Pizza Box hat", 2814 }, --scale 1 { "Roulete hat", 1895 }, --scale 0.8 { "Ventilator hat", 1661 }, --scale 0.8 { "Model car hat", 2485 }, --scale 1 }; 2. how fix this to refresh blip's? says warning on "getElementAttachedTo" function updateBlipColor ( player ) local attachedblip = getElementAttachedTo ( player ) if ( attachedblip ) then local r,g,b = getTeamColor ( getPlayerTeam( player ) ) setBlipColor(blip, r,g,b, 255) end end
-
MADE Bro just edit Meta.xml you will find it in there
-
you mean then spawn second to be destroyed the previus Vehicle?
-
Manve not only damien111 learn something from your turf system from it and i learn something so big thanks you because make this resource
-
it's basic and easy local pArea = createRadarArea( -1442.904296875, -971.251953125, 100, 100, 0, 0, 0, 125 ) local pCuboid = createColRectangle( -1442.904296875, -971.251953125, 100, 100 ) BigSmokes = createTeam("Nazis", 255, 0, 255) addEventHandler("onResourceStart",resourceRoot,function() end ) addEventHandler('onColShapeHit', root, function( p ) -- you should have added player param here local iR, iG, iB = getTeamColor(getPlayerTeam( p ) ) local rR, rG, rB = getRadarAreaColor ( pArea ) if (getPlayerTeam( p )) then if( source == pCuboid ) then if ( iR == rR and iG == rG and iB == rB ) then else if(getElementData( aCuboid, "TurfInProgress" )) then else setRadarAreaFlashing ( aArea, true ) setElementData( aCuboid, "TurfInProgress", true ) wave1 = setTimer( function() setElementData( aCuboid, "TurfInProgress", false ) setRadarAreaColor ( aArea, tR, tG, tB, 125 ) setRadarAreaFlashing ( aArea, false) country = getElementData( p, "Country" ) setElementData( aArea, "CountryOwned", country) end, 60000, 1 ) end end end end end ) addEventHandler( 'onColShapeLeave', root, function( ) if( source == pCuboid ) then setRadarAreaFlashing( pArea, false ) setElementData( aCuboid, "TurfInProgress", false ) setRadarAreaFlashing ( aArea, false) end end ) addEventHandler( "onPlayerWasted", getRootElement( ), function() if( source == pCuboid ) then setRadarAreaFlashing( pArea, false ) setElementData( aCuboid, "TurfInProgress", false ) setRadarAreaFlashing ( aArea, false) end end ) and replace all aCuboid to pCuboid and aArea to pArea
-
good tutorial Bro but use this: part 1 Part 2
-
stolen with edit's: https://community.multitheftauto.com/ind ... ls&id=6411 Original: https://community.multitheftauto.com/index.php?p= ... ils&id=695 DONE
-
i find this tut => https://wiki.multitheftauto.com/wiki/GuiGetScreenSize so no need more help