Jump to content

Problem with little script on chat


MitnickP56

Recommended Posts

Posted

Hi.

I'm trying to create script which doing outputChatBox when GUY from name/serial will say smth on chat box. My code:

serialhaza = {
["2B2BEE3C8B7C95BA25F714E7867557F2"] = true
}
function nahaza(thePlayer)
local hazik = string.find(getPlayerName(thePlayer), "Haze", 1, true)
if  hazik or serialhaza[getPlayerSerial(thePlayer)]then
outputChatBox("haz ciapaty pedal",thePlayer)
end
end   
addEventHandler("onPlayerChat",root,nahaza)

Posted

Try this 

local serialhaza = {
   ["2B2BEE3C8B7C95BA25F714E7867557F2"] = true
}

function nahaza(message, messageType)
    if messageType == 0 then 
        local hazik = string.find(getPlayerName(source), "Haze", 1, true)
        if  hazik or serialhaza[getPlayerSerial(source)] then
            outputChatBox("haz ciapaty pedal",source)
        end
    end 
end   
addEventHandler("onPlayerChat",root,nahaza)

 

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

Posted
1 hour ago, Walid said:

Try this 


local serialhaza = {
   ["2B2BEE3C8B7C95BA25F714E7867557F2"] = true
}

function nahaza(message, messageType)
    if messageType == 0 then 
        local hazik = string.find(getPlayerName(source), "Haze", 1, true)
        if  hazik or serialhaza[getPlayerSerial(source)] then
            outputChatBox("haz ciapaty pedal",source)
        end
    end 
end   
addEventHandler("onPlayerChat",root,nahaza)

 

working ty

 

Posted
1 minute ago, MitnickP56 said:

working ty

np

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

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