Jump to content

[HELP] time command


overlocus

Recommended Posts

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.

  • Like 1
Link to comment
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

  • Thanks 1
Link to comment
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
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 by #َxLysandeR
kucuk bir sey unuttum
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...