abod99119911 Posted August 9, 2014 Posted August 9, 2014 hi guyz. this is script which is to make marker and when player get in the will get full health and armor but i want to add gun:M4 with ammo local team = createTeam ( "TeamName", 0, 255, 0 ) local theMarker = createMarker ( x, y, z, "cylinder", 1.5, 255, 255, 0, 170 ) addEventHandler("onMarkerHit", theMarker, function (thePlayer) if ( getElementType ( thePlayer ) == 'player' ) then if ( getPlayerTeam ( thePlayer ) and getTeamName ( getPlayerTeam ( thePlayer ) ) == 'TeamName' ) then setElementHealth ( thePlayer, 100 ) setPedArmor ( thePlayer, 100 ) end end end ) and here i can add the X, Y, Z for where the marker will be ? local theMarker = createMarker ( x, y, z, "cylinder", 1.5, 255, 255, 0, 170 )
Et-win Posted August 9, 2014 Posted August 9, 2014 giveWeapon And yes, you can do that by doing this: local x, y, z = 1, 2, 3 createMarker --Or: createMarker(1, 2, 3, ... ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
Et-win Posted August 9, 2014 Posted August 9, 2014 Yup. Click on the code and read the wiki. Find the gun list, and there you will find the ID's of weapons, with M4 in it too. ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
abod99119911 Posted August 10, 2014 Author Posted August 10, 2014 see what i do but its not working i put the marker location where is the wrong
Anubhav Posted August 10, 2014 Posted August 10, 2014 (edited) local team = createTeam ( "TeamName", 0, 255, 0 ) local theMarker = createMarker ( -711.68450927734, 957.69964599609, 12.388543128967, "cylinder", 1.5, 255, 255, 0, 170 ) addEventHandler("onMarkerHit", theMarker, function (thePlayer) if ( getElementType ( thePlayer ) == 'player' ) then if ( getPlayerTeam ( thePlayer ) and getTeamName ( getPlayerTeam ( thePlayer ) ) == 'TeamName' ) then setElementHealth ( thePlayer, 100 ) setPedArmor ( thePlayer, 100 ) giveWeapon ( thePlayer, 31, 2000 ) end addEventHandler ( "onPlayerSpawn", getRootElement(), giveWeaponsOnSpawn ) end end ) Edited August 10, 2014 by Guest See my some resources: Skin shop: https://community.multitheftauto.com/in ... ls&id=8008 Note script: https://community.multitheftauto.com/in ... ls&id=8009 Rules Panel: https://community.multitheftauto.com/in ... ls&id=8246 Random Money: https://community.multitheftauto.com/in ... ls&id=8718
Et-win Posted August 10, 2014 Posted August 10, 2014 Event: onMarkerHit "The source of this event is the marker that got hit by the element." ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
TAPL Posted August 10, 2014 Posted August 10, 2014 I don't understand why this line is here? addEventHandler ( "onPlayerSpawn", getRootElement(), giveWeaponsOnSpawn ) And you trying to give weapon to marker? The marker have no hand to carry the gun. giveWeapon ( source, 31, 2000 )
abod99119911 Posted August 10, 2014 Author Posted August 10, 2014 I don't understand why this line is here? addEventHandler ( "onPlayerSpawn", getRootElement(), giveWeaponsOnSpawn ) i found it on wiki
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now