ΞĪŚŚÀ Posted March 2, 2014 Share Posted March 2, 2014 السلام عليكم شباب ابي كود اذا كتب كلمة وهو من تيم معين يسوي حركة وكود اذا كنت بتيم تقدر تقتل بس تيمات محددة يعني انا شرطي اقدر اقتل حرامية وتيم اخر Link to comment
[S.R]==|>K$hK$h Posted March 2, 2014 Share Posted March 2, 2014 addCommandHandler ---- كتآبة امر getPlayerTeam ---- جلب التيم getTeamName ---- جلب اسم التيم setPedAnimation ---- الحركة الطلب الثاني ما فهمته # Link to comment
3NAD Posted March 3, 2014 Share Posted March 3, 2014 لم يتم التجربة -- Client Side AllowedTeams = { ["Police"] = { "Grove", "Medic" }; ["Medic"] = { "Ballas", "No Team", "Grove", "Police" }; --["اسم التيم] = { "x التيمات اللي مايقدر يهاجمها" }; }; addEventHandler ( "onClientPlayerDamage", localPlayer, function ( attacker ) if attacker then if getElementType ( attacker ) == "player" then local sourceTeam, attackerTeam = getPlayerTeam ( source ), getPlayerTeam ( attacker ) if sourceTeam and attackerTeam then local allowTeams = AllowedTeams[ getTeamName ( attackerTeam ) ] if allowTeams then for index, value in ipairs ( allowTeams ) do if value == getTeamName ( sourceTeam ) then cancelEvent ( ) break end end end end end end end ) Link to comment
ΞĪŚŚÀ Posted March 3, 2014 Author Share Posted March 3, 2014 لم يتم التجربة -- Client Side AllowedTeams = { ["Police"] = { "Grove", "Medic" }; ["Medic"] = { "Ballas", "No Team", "Grove", "Police" }; --["اسم التيم] = { "x التيمات اللي مايقدر يهاجمها" }; }; addEventHandler ( "onClientPlayerDamage", localPlayer, function ( attacker ) if attacker then if getElementType ( attacker ) == "player" then local sourceTeam, attackerTeam = getPlayerTeam ( source ), getPlayerTeam ( attacker ) if sourceTeam and attackerTeam then local allowTeams = AllowedTeams[ getTeamName ( attackerTeam ) ] if allowTeams then for index, value in ipairs ( allowTeams ) do if value == getTeamName ( sourceTeam ) then cancelEvent ( ) break end end end end end end 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