BadBoy Posted June 23, 2013 Share Posted June 23, 2013 iam new in the forum but I learn some think but now I want to know what did I wil use for if player in team police attack with weapon ID ( 3 ) player have wanted level then take the player have wanted level follow the player attacked him and his team police and put player in marker . Hope You Guys UnderStand Me . ! Link to comment
PaiN^ Posted June 23, 2013 Share Posted June 23, 2013 "onPlayerDamage" getPlayerTeam getTeamFromName getPlayerWantedLevel toggleAllControls setControlState getElementPosition getElementRotation setElementRotation Link to comment
BadBoy Posted June 23, 2013 Author Share Posted June 23, 2013 it's wil be like this ? addEventHandler("onPlayerDamage",root, function( attacker, attackerweapon, _ , _ ) local players = getElementsByType ( "player" ) for _,v in ipairs(players) do local team = getPlayerTeam(attacker) if ( team ) then if team = getTeamFromName ( "Police" ) then if ( attackerweapon == 3 ) then local x , y , z = getElementPosition ( attacker ) local rx , ry , rz = getElementRotation( attacker ) setElementPosition(v , x , y , z ) setElementRotation(v , rx , ry , rz ) toggleAllControls ( v, true ) setControlState ( "walk", true ) end end end end end ) Link to comment
BadBoy Posted June 23, 2013 Author Share Posted June 23, 2013 Not at all ..# I need help please any example for it onPlayerDamage Link to comment
xXMADEXx Posted June 23, 2013 Share Posted June 23, 2013 Here is your example: addEventHandler ( "onPlayerDamage", root, function ( attacker ) outputChatBox ( getPlayerName ( attacker ).." has hurt you!", source, 255, 0, 0 ) end ) Link to comment
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