Jump to content

Help in sampl Script :(


^Dev-PoinT^

Recommended Posts

Posted

Hi all Look To This i have bind the key no outputChatBox and no errors in debugscript /3

function fanFunction() 
  bindKey (source,"-","down", 
    function(player) 
    outputChatBox (getPlayerName (source) .. "#FFFF00 Need Help Please!",getRootElement(),255,255,0,true) 
    end 
  ) 
end 
addEventHandler ("onPlayerLogin",getRootElement(),fanFunction) 

:roll:

Posted
function fanFunction() 
  bindKey (source,"-","down", 
    function(player) 
    outputChatBox (getPlayerName (player) .. "#FFFF00 Need Help Please!",getRootElement(),255,255,0,true) 
    end 
  ) 
end 
addEventHandler ("onPlayerLogin",getRootElement(),fanFunction) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

The script works perfectly.

Remember that this script binds the key AFTER the player logs in.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

i make This it say server:2 bad argument bindkey ?

function fanFunction() 
    bindKey (player,"-","down", 
    function(player) 
    outputChatBox (getPlayerName (player) .. "#FFFF00Need Help Please!",getRootElement(),255,255,0,true) 
    end 
  ) 
end 
addEventHandler ( "onResourceStart", getRootElement(), fanFunction ) 

Posted
function fanFunction() 
for index, player in pairs(getElementsByType("player")) do 
    bindKey (player,"-","down", 
    function(player) 
    outputChatBox (getPlayerName (player) .. "#FFFF00Need Help Please!",getRootElement(),255,255,0,true) 
    end 
  ) 
    end 
end 
addEventHandler ( "onResourceStart", getRootElement(), fanFunction ) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

You're welcome :D.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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