-
Posts
1,090 -
Joined
-
Last visited
Everything posted by Xwad
-
Hi i want to make that if a player leaves the marker then the timer stops. I made it but its not working:( This is a part of the script. --on marker hit function createMarker(hitElement, matchingDimension) if getElementType(hitElement) =="player" and getPlayerTeam(hitElement) and getTeamName (getPlayerTeam(hitElement)) == "German" then outputChatBox("Please,Stay 10 Secs in the marker to capture the area!",thePlayer,255,109 ,109 ) local timer = setTimer ( captureAreaG, 4000, 1 ) else outputChatBox("Please,Stay 10 Secs in the marker to capture the area!",thePlayer,255,109 ,109 ) local timer = setTimer ( captureAreaA, 4000, 1 ) end end addEventHandler("onMarkerHit", marker, createMarker) --on marker leave function markerLeave( leaveElement, matchingDimension, theTimer, thePlayer ) outputChatBox("You have failed to capture the area!",getRootElement(), 255, 50, 50) if isTimer ( timer ) then killTimer ( timer ) end addEventHandler( "onMarkerLeave", marker, markerLeave )
-
Thanks but i already tryed that. Its not good for me becaouse its repkacing mp5 .. and its a coded script so i cant change the id.. Can you make me pls ab example for that flag? Becaouse there is no example on the wiki for that flag:/
-
so i need use this flag right?? flag_aim_arm
-
What? no i want to change the shooting stance and the camera
-
Hi is it possible to change the rocket lauchers aiming like this?:
-
sorry i dont understand the first and second sentence
-
ohh ok thanks. Is there any video about that?
-
Hi! I have an important question! Is it possible to convert those call of duty objects to mta sa dff,txt? Or some way to use it in mta?Thanks. LINK:
-
Hi! I want to make a new script. A script that adds an m4 weapon to the Fire trucks (id 407) tower. I mean when i enter the firetruck and press mouse 1 then the fire trucks tower will shoot with an m4 gun instead the water gun (like a rhino but not with exdplosions) . So i just want to replace the water gun with an m4 weapon. What functions need i use for that? I tryed to attach a weapon to the firetrucks tower but the problem is that that weapon is not rotating with the tower:/ Please help! Thanks.
-
Cool i used destroy elemnt and its working! but the way thanks ofr you help guys!
-
ohh okay thanks! One more question: If i want to close a gui need i use destroy element? I mean foir example if i open a gui with a command and press a gui button then the gui windows will close. Just becaouse i have a problem with that.. I used that function but its not good for me i want to close the windows not just hide it.: guiSetVisible(spawnG5, false)
-
I fixed! Thanks for all answers! The problem was the i need to set the skin after the spawn!
-
I tryed this but its also not working:( This is a part of the script. if name == "SS-infantry1" then local player = getLocalPlayer() setElementModel( player, 16 ) triggerServerEvent("spawn_heavy", getLocalPlayer(), id) guiSetVisible(bg, false) showCursor(false)
-
Hi i made a script that makes possible when the player has skin id 20 and press H then he will be healed. Its not working:/ what should be the problem? the debugscript says its a bad argumentum (getElementalHealth) function heal () local theHealth = getElementHealth (localPlayer) if getElementModel(source) == 20 then if ( theHealth < 100 ) then setElementHealth ( localPlayer, getElementHealth(localPlayer) + 50 ) unbindKey("h","down",heal) setTimer (bindTheKeys , 7000, 1 ) end end end function bindTheKeys () bindKey ( "h", "down", heal ) end bindTheKeys()
-
HI. how can i add a rotating ped to my guiWindow?? I mean i want to add it to the client gui not spawn the ped in the world. Maybe someting like that? bg = guiCreateWindow(0, 0, 850, 850, "Spawn menu", false) ped1 = createPed(56, 1, 1, 4, bg) setPedRotation(ped1, 315)
-
Hi is it possible to use setPlayerSkin in client side? Just beacouse i tryed and its not working:/ The debugscript says : Warning setPlayerSkin bad argumentum. What should be the problem? This is a part of the script. function joinHeavy(LocalPlayer) setPlayerSkin (localPlayer, 16) end
-
if i use this code then the timer is not working:/ so i edited the script like this: but then the timer was starting on all skins again:/ function rewardTimer(player) local skinId = getElementModel(source) if not skinId == 201 then return end local player = source or player Timer = setTimer ( rewardOnRun, 100, 1,player ) givePlayerMoney ( player, 1 ) end addEventHandler ( "onPlayerSpawn", getRootElement(), rewardTimer ) function rewardOnRun(player) givePlayerMoney ( player, 1 ) setTimer ( rewardTimer, 100, 1,player ) end function stopTimer() if isTimer ( Timer ) then killTimer ( Timer ) end end addEventHandler ( "onPlayerWasted", getRootElement(), stopTimer )
-
This is also working thx! But i have a last last last question i want to make that the timer will only start if the player has skin 201. I made it but its not working:/ What shuld be the problem? function rewardTimer(player) if getElementModel(source) == 201 then local player = source or player Timer = setTimer ( rewardOnRun, 100, 1,player ) givePlayerMoney ( player, 1 ) else cancelEvent() end end addEventHandler ( "onPlayerSpawn", getRootElement(), rewardTimer )
-
one more question. I want to kill the timer if the player die but its not working:/ function rewardTimer(player) local player = source or player local Timer = setTimer ( rewardOnRun, 100, 1,player ) givePlayerMoney ( player, 1 ) end addEventHandler ( "onPlayerSpawn", getRootElement(), rewardTimer ) function rewardOnRun(player) givePlayerMoney ( player, 1 ) setTimer ( rewardTimer, 100, 1,player ) end function stopTimer() if isTimer ( Timer ) then killTimer ( Timer ) end end addEventHandler ( "onPlayerWasted", getRootElement(), stopTimer )
-
Its working thanks! The script is for my new terminator gamemode. I will release it soon. You will see what im doing with the code:D
-
My script is not working pls help! DEBUGSCRIPT 3: WARNING: moneyS.lua: Bad argumentum @ "givePkayerMoney' [Expected element at argumentum 1,got nil] function rewardTimer() setTimer ( rewardOnRun, 10000, 1 ) givePlayerMoney ( source, 3000 ) end addEventHandler ( "onPlayerSpawn", getRootElement(), rewardTimer ) function rewardOnRun() givePlayerMoney ( source, 3000 ) setTimer ( rewardTimer, 10000, 1 ) end
-
Last question. why is it not working if add more weapons? if isElement ( attacker ) and weapon == 30 and weapon == 22 and weapon == 28 and weapon == 29 and getElementType(attacker) == "player" and getElementModel(source) == 165 then
-
Its working now! thanks a lot IIYAMA!!!
