overlocus Posted August 24, 2018 Share Posted August 24, 2018 function hirsiz (player) if not isGuestAccount(getPlayerAccount(player)) then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("Hirsiz")) then takeAllWeapons (player ) setPedArmor (player, 0 ) giveWeapon(player,4) giveWeapon(player,22,100) setPedSkin(player, 144 ) setPlayerTeam ( player, Hirsiz ) outputChatBox("#FFFFFF[#00FF00!#FFFFFF] Hırsızlık araçları verildi.", player, 255, 0, 0, true) else outputChatBox("#FFFFFF[#FF0000!#FFFFFF] Bu komutu kullanmak için Hırsız olmanız gerekiyor.", player, 255, 0, 0, true) end end end addCommandHandler("hirsiz",hirsiz) I want the players to use this command once a minute. 1 Link to comment
overlocus Posted August 24, 2018 Author Share Posted August 24, 2018 I do not know how to do it. 5 minutes ago, DiGiTal said: Use setTimer() Link to comment
DiGiTal Posted August 24, 2018 Share Posted August 24, 2018 setTimer( function () return nil end ,60000,1) Add this before "else". Im on phone srry 1 Link to comment
overlocus Posted August 24, 2018 Author Share Posted August 24, 2018 23 minutes ago, DiGiTal said: setTimer( function () return nil end ,60000,1) Add this before "else". Im on phone srry Thanks for helping me. Could you add it to my code? or can someone else help? Link to comment
overlocus Posted August 25, 2018 Author Share Posted August 25, 2018 11 hours ago, Dimos7 said: Try yourself I have no idea how to do it. Link to comment
DiGiTal Posted August 25, 2018 Share Posted August 25, 2018 function hirsiz (player) if not isGuestAccount(getPlayerAccount(player)) then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("Hirsiz")) then takeAllWeapons (player ) setPedArmor (player, 0 ) giveWeapon(player,4) giveWeapon(player,22,100) setPedSkin(player, 144 ) setPlayerTeam ( player, Hirsiz ) outputChatBox("#FFFFFF[#00FF00!#FFFFFF] Hırsızlık araçları verildi.", player, 255, 0, 0, true) setTimer(function() return nil end,60000,1) else outputChatBox("#FFFFFF[#FF0000!#FFFFFF] Bu komutu kullanmak için Hırsız olmanız gerekiyor.", player, 255, 0, 0, true) end end end addCommandHandler("hirsiz",hirsiz) @overlocus i suggest you to learn. Because this section isnt for requesting scripts. And it courage the newbie to dont learn 1 Link to comment
overlocus Posted August 25, 2018 Author Share Posted August 25, 2018 1 hour ago, DiGiTal said: function hirsiz (player) if not isGuestAccount(getPlayerAccount(player)) then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("Hirsiz")) then takeAllWeapons (player ) setPedArmor (player, 0 ) giveWeapon(player,4) giveWeapon(player,22,100) setPedSkin(player, 144 ) setPlayerTeam ( player, Hirsiz ) outputChatBox("#FFFFFF[#00FF00!#FFFFFF] Hırsızlık araçları verildi.", player, 255, 0, 0, true) setTimer(function() return nil end,60000,1) else outputChatBox("#FFFFFF[#FF0000!#FFFFFF] Bu komutu kullanmak için Hırsız olmanız gerekiyor.", player, 255, 0, 0, true) end end end addCommandHandler("hirsiz",hirsiz) @overlocus i suggest you to learn. Because this section isnt for requesting scripts. And it courage the newbie to dont learn It doesn't work I want the players not to use this command over and over the command can only be used once per minute. Link to comment
SycroX Posted August 25, 2018 Share Posted August 25, 2018 (edited) local pSpam = {} function hirsiz(player) if not isGuestAccount(getPlayerAccount(player)) and isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("Hirsiz")) then if not pSpam[player] then takeAllWeapons(player) setPedArmor(player, 0) giveWeapon(player, 4, 1) giveWeapon(player, 22, 100) setElementModel(player, 144) setPlayerTeam(player, Hirsiz) outputChatBox("#FFFFFF[#00FF00!#FFFFFF] Hırsızlık araçları verildi.", player, 255, 0, 0, true) pSpam[player] = true setTimer(function(player) if isElement(player) then pSpam[player] = false end end, 60000, 1, player) else outputChatBox("#FFFFFF[#FF0000!#FFFFFF] biraz bekle", player, 255, 0, 0, true) end else outputChatBox("#FFFFFF[#FF0000!#FFFFFF] Bu komutu kullanmak için Hırsız olmanız gerekiyor.", player, 255, 0, 0, true) end end addCommandHandler("hirsiz", hirsiz) Edited August 25, 2018 by #َxLysandeR kucuk bir sey unuttum 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