-
Posts
111 -
Joined
-
Last visited
Everything posted by OGF
-
onClientClick https://wiki.multitheftauto.com/wiki/OnClientClick 8th argument The example should give you an idea how it's done
-
watup Chaz, how you been? What you could also do to update the panel playerlist on events such as onClientPlayerJoin, onClientPlayerQuit, and onClientPlayerChangeNick. That way when you have the panel opened it just updates it automatically instead of opening and closing just so it refreshes.
-
viewtopic.php?f=91&t=63269&p=601460#p601460 bindKey unbindKey
-
Someone already wrote a script for you on how to stop animations with spacebar. Use it and learn from it.
-
addEvent ( "startWindow", true ) addEventHandler("startWindow", root, function() GUIEditor.window[1] = guiCreateWindow(166, 96, 545, 402, "credits", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1],false) GUIEditor.staticimage[1] = guiCreateStaticImage(16, 31, 152, 127, "banshee.png", false, GUIEditor.window[1]) end ) -- server function player_Spawn ( posX, posY, posZ, spawnRotation, theTeam, theSkin, theInterior, theDimension ) triggerClientEvent ( "startWindow", source ) end addEventHandler ( "onPlayerSpawn", getRootElement(), player_Spawn ) what are you trying to do with the bindKey exactly?
-
well that ruined the learning experience
-
setPedAnimation(localPlayer,false) Just remember localPlayer = getLocalPlayer() ---this function is only used when you are scripting on the client side.
-
That one is for the client. and I know it's working fine.
-
function relax() setPedAnimation (localPlayer, "BEACH", "Lay_Bac_Loop") if isTimer ( hpTimer ) then return end hpTimer = setTimer ( function() if getElementHealth ( localPlayer ) < 200 then setElementHealth ( localPlayer, getElementHealth ( localPlayer ) + 10 ) else killTimer ( hpTimer ) end end, 10000, 0 ) end addCommandHandler ("relax", relax) Try this. as for the animation i'll leave that to you.
-
@ bssol pls learn the difference between client and server you also liOneLMeSsIshoT. isPedDead is a server only function.... so you are running this script clientside
-
You're not using this clientsided are you?
-
try to copy my script again and try it. I just nested a function within the timer one, also the 10000, 0 are the next 2 required arguments for setTimer which as you probably know are interval and times to execute the function.
-
function relax (theplayer) setPedAnimation (theplayer, "Lay_Bac_Loop") hpTimer = setTimer ( function() if getElementHealth ( theplayer ) < 100 then setElementHealth ( theplayer, getElementHealth ( theplayer ) + 10 ) else killTimer ( hpTimer ) end end, 10000, 0 ) end addCommandHandler ("relax", relax) This is just for the health part, of course you should make sure the person is doing the animation
-
I just use string getElementZoneName ( element theElement, [bool citiesonly=false] ) Then spawn them depending on what it returns.
-
When the vehicle health gets to a certain point, make the car damage proof. Use these 2 functions bool setVehicleDamageProof ( vehicle theVehicle, bool damageProof ) float getElementHealth ( element theElement )
-
of course it's not on the PC.
-
I'm pretty sure it uses MD5
-
How did gta 4 not deliver ? The game has its flaws but it sure as fuck delivered