-
Posts
1,089 -
Joined
-
Last visited
Everything posted by Xwad
-
Hi i just want to ask that how can i make an outputchatbox in server side local? I mean if forexample a player hit a marker then the script will output a chatbox. And i want to make that only the player will see that chatbox who hit the marker. Becaouse i made a script like that and when the player hit the marker than everyone saw the chatbox. This is a pőart of my script function markerHit6(hitElement, matchingDimension, player, thePlayer) if getElementType(hitElement) =="player" and getPlayerTeam(hitElement) and getTeamName (getPlayerTeam(hitElement)) == "America" and isElement (GA6) then outputChatBox("Please,Stay 10 Secs in the area to capture it !",thePlayer,255,109 ,109 ) timer6 = setTimer ( captureAreaA6, 4000, 1 ) else cancelEvent() if getElementType(hitElement) =="player" and getPlayerTeam(hitElement) and getTeamName (getPlayerTeam(hitElement)) == "German" and isElement (UA6) then outputChatBox("Please,Stay 10 Secs in the area to capture it !",thePlayer,255,109 ,109 ) timer6 = setTimer ( captureAreaG6, 4000, 1 ) end end end addEventHandler("onMarkerHit", marker6, markerHit6)
-
Yeah its eneugbt for me if the aiming is like an mp5
-
but its here: "flag_aim_arm" - bool - Uses other arm for aiming its says that its possible to change the aiming animation. It says it can be used an other weapon animation for aiming!
-
and is it possible to change it to mp5 stance? If yes the how?
-
But i want to change the tec9 shooting stance to m4 shooting stance
-
I already tryed that but the tec9 weapon shooting style is not chaning. And it will not work becaouse i didnt add the m4 id:/ What should i do now?
-
No i trying to change the tec 9 weapon shooting style(stance) to m4 shooting style but its wont work:(( pls help me somehow! I made thios script: function stance() if weapon = 32 then setWeaponProperty ( 32,"pro","flag_aim_arm", true ) end addEventHandler( "onWeaponFire", root, stance )
-
One more question. I tryed to make that i created a marker and if a player hit the marker then it will check the team ,and if the player is from the german team then a timer will start the captureAreaG6 function. And if the player is in America team then it will start the captureAreaA6.. The problem is that its only working if the player is in german team.. Its not working with america team.. The captureAreaA6 function is not starting:( (This is not the full script) local marker6 = createMarker(-1066.28, -1146.61, 129.87, 'cylinder', 3, 250, 250, 250, 250) local alpha = 170 function markerHit6(hitElement, matchingDimension, player) if getElementType(hitElement) =="player" and getPlayerTeam(hitElement) and getTeamName (getPlayerTeam(hitElement)) == "America" then if isElement (GA6) then outputChatBox("Please,Stay 10 Secs in the marker to capture the area!",thePlayer,255,109 ,109 ) timer6 = setTimer ( captureAreaA6, 4000, 1 ) else if getElementType(hitElement) =="player" and getPlayerTeam(hitElement) and getTeamName (getPlayerTeam(hitElement)) == "German" then if isElement (UA6) then outputChatBox("Please,Stay 10 Secs in the marker to capture the area!",thePlayer,255,109 ,109 ) timer6 = setTimer ( captureAreaG6, 4000, 1 ) else cancelEvent() end end end end end addEventHandler("onMarkerHit", marker6, markerHit6) function captureAreaG6(commandName, player) GA6 = createRadarArea ( -1220, -1165, 250, 300, 40, 40, 40, alpha ) markerG6 = createMarker ( -1082.77, -1173.14, 128, "cylinder", 3, 255, 255, 0, 170 ) if isElement(markerA6) then destroyElement ( markerA6 ) destroyElement ( UA6 ) end end function captureAreaA6(commandName, player) UA6 = createRadarArea ( -1220, -1165, 250, 300, 255, 255, 31, alpha ) markerA6 = createMarker ( -1082.77, -1173.14, 128, "cylinder", 3, 255, 255, 0, 170 ) if isElement(markerG6) then destroyElement ( markerG6 ) destroyElement ( GA6 ) end end
-
I tested the script and it is working! Thanks XeoN-!
-
I edited it but its still not working:/ function BuyWeaponOnServer(weapon_name, thePlayer, theVehicle) player_money = getPlayerMoney(source) player_account = getPlayerAccount(source) local price_car = "1200" local price_truck = "2200" local price_halftrack = "3500" local price_tiger = "8000" if(weapon_name == "car") then local x,y,z = getElementPosition( thePlayer ) if(player_money >= tonumber(price_car )) then takePlayerMoney(source, tonumber(price_car )) car = createVehicle ( 470, -1068.9, -1205.79, 130 ) warpPedIntoVehicle ( thePlayer, car ) else outputChatBox("You do not have enough money!", source, 255, 0, 0) end elseif(weapon_name == "truck") then local x,y,z = getElementPosition( thePlayer ) if(player_money >= tonumber(price_truck)) then takePlayerMoney(source, tonumber(price_truck)) truck = createVehicle ( 433, -1068.9, -1205.79, 130 ) warpPedIntoVehicle ( thePlayer, truck ) else outputChatBox("You do not have enough money!", source, 255, 0, 0) end elseif(weapon_name == "halftrack") then local x,y,z = getElementPosition( thePlayer ) if(player_money >= tonumber(price_halftrack)) then takePlayerMoney(source, tonumber(price_halftrack)) halftrack = createVehicle ( 552, -1068.9, -1205.79, 130 ) warpPedIntoVehicle ( thePlayer, halftrack ) else outputChatBox("You do not have enough money!", source, 255, 0, 0) end elseif(weapon_name == "tiger") then local x,y,z = getElementPosition( thePlayer ) if(player_money >= tonumber(price_tiger)) then takePlayerMoney(source, tonumber(price_tiger)) tiger = createVehicle ( 432, -1068.9, -1205.79, 130 ) warpPedIntoVehicle ( thePlayer, tiger ) else outputChatBox("You do not have enough money!", source, 255, 0, 0) end end end addEvent("buy_vehicle", true) addEventHandler("buy_vehicle", getRootElement(), BuyWeaponOnServer)
-
Its not warpibng me in the vehicle only creating it pls help. it says its a badargumentum function BuyWeaponOnServer(weapon_name, thePlayer) player_money = getPlayerMoney(source) player_account = getPlayerAccount(source) local price_car = "1200" local price_truck = "2200" local price_halftrack = "3500" local price_tiger = "8000" if(weapon_name == "car") then if(player_money >= tonumber(price_car )) then takePlayerMoney(source, tonumber(price_car )) car = createVehicle ( 470, -1068.9, -1205.79, 130 ) warpPedIntoVehicle ( car ) else outputChatBox("You do not have enough money!", source, 255, 0, 0) end elseif(weapon_name == "truck") then if(player_money >= tonumber(price_truck)) then takePlayerMoney(source, tonumber(price_truck)) truck = createVehicle ( 433, -1068.9, -1205.79, 130 ) warpPedIntoVehicle ( truck ) else outputChatBox("You do not have enough money!", source, 255, 0, 0) end elseif(weapon_name == "halftrack") then if(player_money >= tonumber(price_halftrack)) then takePlayerMoney(source, tonumber(price_halftrack)) halftrack = createVehicle ( 552, -1068.9, -1205.79, 130 ) warpPedIntoVehicle ( halftrack ) else outputChatBox("You do not have enough money!", source, 255, 0, 0) end elseif(weapon_name == "tiger") then if(player_money >= tonumber(price_tiger)) then takePlayerMoney(source, tonumber(price_tiger)) tiger = createVehicle ( 432, -1068.9, -1205.79, 130 ) warpPedIntoVehicle ( tiger ) else outputChatBox("You do not have enough money!", source, 255, 0, 0) end end end addEvent("buy_vehicle", true) addEventHandler("buy_vehicle", getRootElement(), BuyWeaponOnServer)
-
Ohh cool now its working! Thanks guys!
-
Yeah the alpha is nefined and its just a part of my script. Here is the full script. And thanks for the fast answer! --markers local marker6 = createMarker(-1066.28, -1146.61, 129.87, 'cylinder', 3, 250, 250, 250, 250) --shop markers local alpha = 170 --AREA MARKER6 --on marker hit function createMarker6(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 ) timer6 = setTimer ( captureAreaG6, 4000, 1 ) else outputChatBox("Please,Stay 10 Secs in the marker to capture the area!",thePlayer,255,109 ,109 ) timer6 = setTimer ( captureAreaA6, 4000, 1 ) end end addEventHandler("onMarkerHit", marker6, createMarker6) function createMarkerG6(hitElement, matchingDimension, thePlayer) if getElementType(hitElement) =="player" and getPlayerTeam(hitElement) and getTeamName (getPlayerTeam(hitElement)) == "German" then triggerClientEvent ( thePlayer, root, "CreateVshop_g" ) else outputChatBox("You can't buy form the enemys shop!",thePlayer,255,50 ,50 ) end end addEventHandler("onMarkerHit", markerG6, createMarkerG6) --on marker leave function markerLeave6( leaveElement, matchingDimension, theTimer, thePlayer ) if isTimer ( timer6 ) then outputChatBox("You have failed to capture the area!",getRootElement(), 255, 50, 50) killTimer ( timer6 ) end end addEventHandler( "onMarkerLeave", marker6, markerLeave6 ) function captureAreaG6() destroyElement ( UA6 ) destroyElement ( markerA6 ) GA6 = createRadarArea ( -1220, -1165, 250, 300, 40, 40, 40, alpha ) markerG6 = createMarker ( -1082.77, -1173.14, 128, "cylinder", 3, 255, 255, 0, 170 ) end function captureAreaA6() destroyElement ( UA6 ) destroyElement ( markerG6 ) UA6 = createRadarArea ( -1220, -1165, 250, 300, 255, 255, 31, alpha ) end
-
hi i created a marker in a function but the other funvtion is not starting when i enter the marker.. The createMarkerG6 is not starting when i enter the "markerG6" maker! function createMarkerG6(hitElement, matchingDimension, thePlayer) if getElementType(hitElement) =="player" and getPlayerTeam(hitElement) and getTeamName (getPlayerTeam(hitElement)) == "German" then triggerClientEvent ( thePlayer, root, "CreateVshop_g" ) else outputChatBox("You can't buy form the enemys shop!",thePlayer,255,50 ,50 ) end end addEventHandler("onMarkerHit", markerG6, createMarkerG6) function captureAreaG6() destroyElement ( UA6 ) destroyElement ( markerA6 ) GA6 = createRadarArea ( -1220, -1165, 250, 300, 40, 40, 40, alpha ) markerG6 = createMarker ( -1082.77, -1173.14, 128, "cylinder", 3, 255, 255, 0, 170 ) end
-
One more question! How can i make the rocket faster when im shooting with rpg?
-
Working!! Thanks a lot!!<3
-
thanks. One more question. how can i set it to mp5 stance? I was looking for the answer on the inetrenet but there is nothing with flag_aim_arm:/
-
HI i want to stop the animation with the timer but the ds3 is always saying: Bad argumentum:( function tazershootserverside ( ) setPedAnimation ( source, "RIFLE", "RIFLE_load") toggleControl (source, "fire", false) setTimer(toggleControl, 5000, 1, source, "fire", true) setTimer( stopAnim, 2000, 1 ) end addEvent ( "ontazershoot", true ) addEventHandler ( "ontazershoot", root, tazershootserverside ) function stopAnim (source) setPedAnimation (source) end
-
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 )