Jump to content

[HELP] Script


1LoL1

Recommended Posts

Posted
function poop () 
setElementData(source, "ttt", (getElementData(source, "ttt") or 0) + 1) 
setElementData(source, "ttt", (getElementData(source, "ttt") or 0) + 0) 
end 
addEventHandler("onPlayerMute", getRootElement(),poop) 
addEventHandler("onPlayerUnMute", getRootElement(),poop) 

try that i'm not sure about it work or no

this will when player muted +1 ttt and +0 ttt | unmuted +1 ttt and +0 ttt :lol:

Posted
I'm wrong or nobody here understand you? Please explain your problem and improve your English skills.

-_-

Player muted he get 1x ttt

but when i unmuted player he get 1x ttt too and this i don't want -_- i want only "When player muted he get 1x ttt"

Posted

i really don't understand xD

  
function mute () 
setElementData(source, "ttt", getElementData(source, "ttt")+ 1) 
end 
addEventHandler("onPlayerMute", root, mute) 
  
function unmute() 
    setElementData(source, "ttt",getElementData(source, "ttt")- 1) 
end 
addEventHandler("onPlayerUnmute", root, unmute) 

Posted
i really don't understand xD
  
function mute () 
setElementData(source, "ttt", getElementData(source, "ttt")+ 1) 
end 
addEventHandler("onPlayerMute", root, mute) 
  
function unmute() 
    setElementData(source, "ttt",getElementData(source, "ttt")- 1) 
end 
addEventHandler("onPlayerUnmute", root, unmute) 

i mean this omg -________________________-

function ttt () 
setElementData(source, "ttt", getElementData(source, "ttt") + 1) 
end 
addEventHandler("onPlayerMute", getRootElement(), ttt) 

this work but when i unmuted player he get too 1x ttt and i want only when player muted

so i know this is wrong but i want this

if addEventHandler("onPlayerUnmute", getRootElement(), ttt) then 
cancelEvent() 

so i must use?

removeEventHandler 

Posted
As i understand you mean if the muted player has ttt he can't get un muted ?

Not. Now it works is that when a player gets mute so gets 1 ttt and when I give him so unmute gets 1 ttt .. and also I want this:

When a player gets mute so one gets ttt and when I give him unmute so nothing will happen only when you receive mute so gets 1 ttt

Posted

This issue from admin panel as it trigger event onPlayerMute, however this issue was fixed on latest admin panel, download latest mta resource from HERE.

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...