-
Posts
7,337 -
Joined
-
Days Won
11
Everything posted by TAPL
-
giveWeapon is only Server side Oo
-
this should do what you want function createPeds ( player, cmd, skin, weaponID, ammo ) local x, y, z = getElementPosition( player ) ped = createPed(skin, x, y, z) giveWeapon ( ped, weaponID, ammo, true ) end addCommandHandler ( "ped", createPeds )
-
local teamadmin = createTeam("Admin's",255,255,255) ---you can change the color local teamg = createTeam("Guests",255,255,255) ---you can change the color function onJoin(player) setPlayerTeam(player, teamg) end function onLogin() if isObjectInACLGroup ("user." ..getAccountName(getPlayerAccount(source)) , aclGetGroup ("Admin")) then setPlayerTeam(source, teamadmin) end end function timerl() setTimer(onLogin,1000,1,source) end addEventHandler("onPlayerLogin", getRootElement(), timerl) function timer() setTimer(onJoin,1000,1,source) end addEventHandler("onPlayerJoin", getRootElement(), timer)
-
mutch i forgot, you will need setTimer to back Nametag showing and back Alpha to normal ( you have to try do that by yourself )
-
addEvent("toggleInvis",true) addEventHandler("toggleInvis",root, function() local PlayerMoney = getPlayerMoney(source) if ( PlayerMoney >= 1000) then takePlayerMoney(source,1000) setPlayerNametagShowing(source, false) setElementAlpha(source, 0) outputChatBox(getPlayerName(source) .." has bought invis $1000 !!!", 255, 255, 0, root) else outputChatBox("You Dont Have Money to buy invis",source) end end) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == weapButton_22 ) then triggerServerEvent("toggleInvis",getLocalPlayer()) end end)
-
lol that because he think all scripting are from wiki. follow the Syntax and read what wiki are saying wiki is not just example, look at syntax and try to understand the function by yourself, that all what you need.
-
try this lol addCommandHandler ( "party", function () local sound = playSound("disco_pogo.mp3") setSoundVolume(sound, 0.5) function xxx() for i, car in ipairs( getElementsByType( "vehicle" ) ) do local color = {} color[1] = math.random(0,255) color[2] = math.random(0,255) color[3] = math.random(0,255) color[4] = math.random(0,255) setVehicleColor ( car, color[1], color[2], color[3], color[4] ) setSkyGradient ( math.random (0,255), math.random (0,255), math.random (0,255), math.random (0,255), math.random (0,255), math.random (0,255) ) setWaterColor(math.random (0,255), math.random (0,255), math.random (0,255)) end end setTimer(xxx,300,46) end)
-
make it client-side not server-side ^^
-
addCommandHandler ( "party", function () setTimer(xxx,300,46) end) function xxx() local sound = playSound("disco_pogo.mp3") setSoundVolume(sound, 0.5) for i, car in ipairs( getElementsByType( "vehicle" ) ) do local color = {} color[1] = math.random(0,255) color[2] = math.random(0,255) color[3] = math.random(0,255) color[4] = math.random(0,255) setVehicleColor ( car, color[1], color[2], color[3], color[4] ) setSkyGradient ( math.random (0,255), math.random (0,255), math.random (0,255), math.random (0,255), math.random (0,255), math.random (0,255) ) setWaterColor(math.random (0,255), math.random (0,255), math.random (0,255)) end end or addCommandHandler ( "party", function () function xxx() local sound = playSound("disco_pogo.mp3") setSoundVolume(sound, 0.5) for i, car in ipairs( getElementsByType( "vehicle" ) ) do local color = {} color[1] = math.random(0,255) color[2] = math.random(0,255) color[3] = math.random(0,255) color[4] = math.random(0,255) setVehicleColor ( car, color[1], color[2], color[3], color[4] ) setSkyGradient ( math.random (0,255), math.random (0,255), math.random (0,255), math.random (0,255), math.random (0,255), math.random (0,255) ) setWaterColor(math.random (0,255), math.random (0,255), math.random (0,255)) end end setTimer(xxx,300,46) end) both code work
-
show your client so we can help you when we know what you are trying to do, also there are no such functions client to save account data.
-
about 106 skin , this skin need the file dff ( i have this skin "army") and about 107 skin (this is original swat skin and becuase it's already in game you can't Import a same thing) so the problem is not from the script it's from the skin that you want change it
-
upload your resource lets see what you doing wrong should be setTimer(test, 1000, 1)
-
are you sure the skin txd files is in folder "skins" ? try this
-
isn't this better? function weapon () if isPedHeadless (localPlayer) == true then triggerServerEvent ("onPlayerWeaponFire", localPlayer) end end addEventHandler ( "onClientPlayerWeaponFire", localPlayer, weapon )
-
addEventHandler("onClientResourceStart",resourceRoot, function() skin1 = engineLoadTXD ( "skins/106.txd" ) engineImportTXD ( skin1, 106 ) skin2 = engineLoadTXD ( "skins/107.txd" ) engineImportTXD ( skin2, 107 ) end)
-
this not needed -,- just remove it local root = getRootElement()
-
viewtopic.php?f=91&t=35746
-
local flag = call(getResourceFromName("admin"), "getPlayerCountry", source) setElementData(source,"Country",flag)
-
function isWindowShowing() lol = false for i,v in pairs(getElementsByType("gui-window")) do if (guiGetVisible(v) == true) then lol = true end end return lol end
-
local blood = guiCreateStaticImage(0.2611,0.5067,0.4826,0.1111,"images/firstblood.png",true) guiSetVisible(blood, false) function wasted (killer, weapon, bodypart) local sound = playSound("sounds/wasted.ogg") setSoundVolume(sound, 0.5) guiSetVisible(blood, true) setTimer (guiSetVisible, 5000, 1, blood, false ) end addEventHandler("onClientPlayerWasted", getLocalPlayer(), wasted)
-
just add this in client-side function ToggleShop() if guiGetVisible(shopWindow) == true then guiSetVisible(shopWindow,false) showCursor(false) else guiSetVisible(shopWindow,true) showCursor(true) end end bindKey("F1","down",ToggleShop)
-
https://community.multitheftauto.com/index.php?p= ... ils&id=131 https://community.multitheftauto.com/index.php?p= ... ls&id=2069
-
that because you use it in 1.0.5 if you use it in 1.1 you will have no problem