Jokeℝ1472771893 Posted May 16, 2012 Posted May 16, 2012 (edited) function LSPDCuff (attacker, attackerweapon, bodypart, loss) if (attackerweapon == 3) and (loss > 2 ) then setElementPosition (source,227.10449221875, 111.24414062, 999.015625, true) takePlayerMoney (source, 100) givePlayerMoney (attacker, 1000) end end addEventHandler ("onPlayerDamage", getRootElement(), LSPDCuff How to make this when player have wanted level then Police can Jail? Edited May 16, 2012 by Guest
Guest Guest4401 Posted May 16, 2012 Posted May 16, 2012 getPlayerWantedLevel Offtopic : Can you henceforth start using instead of
Jokeℝ1472771893 Posted May 16, 2012 Author Posted May 16, 2012 getPlayerWantedLevelOfftopic : Can you henceforth start using instead of OK thnx
Jokeℝ1472771893 Posted May 16, 2012 Author Posted May 16, 2012 function LSPDCuff (attacker, attackerweapon, bodypart, loss) if (attackerweapon == 3) and (loss > 2 ) then setElementPosition (source,227.10449221875, 111.24414062, 999.015625, true) takePlayerMoney (source, 100) givePlayerMoney (attacker, 1000) end end addEventHandler ("onPlayerDamage", getRootElement(), LSPDCuff local players = getElementsByType ( "player" ) for theKey,thePlayer in ipairs(players) do local level = getPlayerWantedLevel ( thePlayer ) if ( level > 0 ) then outputChatBox ( getPlayerName ( thePlayer ) .. " Has a wanted level of " .. level .. " stars!" ) end end function outputWantedLevel () local wantedLvl = getPlayerWantedLevel ( ) if wantedLvl == 0 then outputChatBox ( "You clean", 0, 255, 0) else outputChatBox ( "You have "..wantedLvl.." wanted stars!", 255, 0, 0) end end addCommandHandler ( "wanted", outputWantedLevel ) Like this?
X-SHADOW Posted May 16, 2012 Posted May 16, 2012 function LSPDCuff (attacker, attackerweapon, bodypart, loss) if (attackerweapon == 3) and (loss > 2 and getPlayerWantedLevel == 2 ) then setElementPosition (source,227.10449221875, 111.24414062, 999.015625, true) takePlayerMoney (source, 100) givePlayerMoney (attacker, 1000) end end addEventHandler ("onPlayerDamage", getRootElement(), LSPDCuff)
Jokeℝ1472771893 Posted May 16, 2012 Author Posted May 16, 2012 function LSPDCuff (attacker, attackerweapon, bodypart, loss) if (attackerweapon == 3) and (loss > 2 and getPlayerWantedLevel == 2 ) then setElementPosition (source,227.10449221875, 111.24414062, 999.015625, true) takePlayerMoney (source, 100) givePlayerMoney (attacker, 1000) end end addEventHandler ("onPlayerDamage", getRootElement(), LSPDCuff) i try now thnx
Jokeℝ1472771893 Posted May 16, 2012 Author Posted May 16, 2012 function LSPDCuff (attacker, attackerweapon, bodypart, loss) if (attackerweapon == 3) and (loss > 2 and getPlayerWantedLevel == 2 ) then setElementPosition (source,227.10449221875, 111.24414062, 999.015625, true) takePlayerMoney (source, 100) givePlayerMoney (attacker, 1000) end end addEventHandler ("onPlayerDamage", getRootElement(), LSPDCuff) Nothing
Guest Guest4401 Posted May 16, 2012 Posted May 16, 2012 getPlayerWantedLevel == 2 @X-SHADOW Do you think a function can ever be a number? It should be getPlayerWantedLevel(player) == 2
Jokeℝ1472771893 Posted May 16, 2012 Author Posted May 16, 2012 function LSPDCuff (attacker, attackerweapon, bodypart, loss) if (attackerweapon == 3) and (loss > 2 and getPlayerWantedLevel(player) == 2 ) then setElementPosition (source,227.10449221875, 111.24414062, 999.015625, true) takePlayerMoney (source, 100) givePlayerMoney (attacker, 1000) end end addEventHandler ("onPlayerDamage", getRootElement(), LSPDCuff) Like this?
X-SHADOW Posted May 16, 2012 Posted May 16, 2012 oh Sorry i mest that and Stars you cant put 2 or 3 or what you like here function LSPDCuff (attacker, attackerweapon, bodypart, loss) if (attackerweapon == 3) and (loss > 2 and (getPlayerWantedLevel( source ) == 2 )) then setElementPosition (source,227.10449221875, 111.24414062, 999.015625, true) takePlayerMoney (source, 100) givePlayerMoney (attacker, 1000) end end addEventHandler ("onPlayerDamage", getRootElement(), LSPDCuff)
Jokeℝ1472771893 Posted May 16, 2012 Author Posted May 16, 2012 oh Sorry i mest that and Stars you cant put 2 or 3 or what you like here function LSPDCuff (attacker, attackerweapon, bodypart, loss) if (attackerweapon == 3) and (loss > 2 and (getPlayerWantedLevel( source ) == 2 )) then setElementPosition (source,227.10449221875, 111.24414062, 999.015625, true) takePlayerMoney (source, 100) givePlayerMoney (attacker, 1000) end end addEventHandler ("onPlayerDamage", getRootElement(), LSPDCuff) thnx its WORK
X-SHADOW Posted May 16, 2012 Posted May 16, 2012 Your Welcome haha its my first time help some one iam very Happy Now ^^
Jokeℝ1472771893 Posted May 16, 2012 Author Posted May 16, 2012 Your Welcome haha its my first time help some one iam very Happy Now ^^ LOL Nice that it was me
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