panos144 Posted April 28, 2013 Posted April 28, 2013 hi guys why this working with all players and no only with Squards team? function unwanted (player) setPlayerWantedLevel( source,0 ) if getPlayerTeam(player) == getTeamFromName("Squards") then end end addEventHandler ( "onPlayerSpawn", root, unwanted ) SAPS:RPG owner In game name:panagiotis
Sparrow Posted April 28, 2013 Posted April 28, 2013 you setted 'source' instead of 'player' function unwanted (player) if getPlayerTeam(player) == getTeamFromName("Squards") then setPlayerWantedLevel( player,0 ) end end addEventHandler ( "onPlayerSpawn", root, unwanted )
panos144 Posted April 28, 2013 Author Posted April 28, 2013 oh i forgot that thanks. SAPS:RPG owner In game name:panagiotis
xXMADEXx Posted April 28, 2013 Posted April 28, 2013 you setted 'source' instead of 'player' function unwanted (player) if getPlayerTeam(player) == getTeamFromName("Squards") then setPlayerWantedLevel( player,0 ) end end addEventHandler ( "onPlayerSpawn", root, unwanted ) Wrong. function unwanted () if getPlayerTeam(getTeamName(source)) == getTeamFromName("Squards") then setPlayerWantedLevel( source,0 ) end end addEventHandler ( "onPlayerSpawn", root, unwanted ) The Ultimate Lua Tutorial! | MTA PHP SDK
panos144 Posted April 28, 2013 Author Posted April 28, 2013 (edited) again nothing Edited April 28, 2013 by Guest SAPS:RPG owner In game name:panagiotis
Sparrow Posted April 28, 2013 Posted April 28, 2013 wrong if getPlayerTeam(getTeamName(source)) == getTeamFromName("Squards") then correct: if (getTeamName(getPlayerTeam(source)) == "Squards") then
panos144 Posted April 28, 2013 Author Posted April 28, 2013 (edited) Deleted Edited April 29, 2013 by Guest SAPS:RPG owner In game name:panagiotis
panos144 Posted April 28, 2013 Author Posted April 28, 2013 working perfect thanks for repplies SAPS:RPG owner In game name:panagiotis
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