A7mad-78 Posted December 24, 2010 Share Posted December 24, 2010 Hi Every one i have problem in my script it's very small script just for test But it's has a problem local randomPlayer = getRandomPlayer ( ) outputChatBox ( getPlayerName ( RandomPlayer ).." Has win 1025$ " ) givePlayerMoney ( randomPlayer, 1025 ) --give the player money according to the amount setTimer ( randomPlayer, 1000, 1, "xD!" ) And what i mean it's Get random player then give him a 1025$ And it's getrandomplayer every 1000second Please help Link to comment
Kenix Posted December 24, 2010 Share Posted December 24, 2010 local randomPlayer = getRandomPlayer ( ) outputChatBox ( getPlayerName ( randomPlayer ).." Has win 1025$ " ) givePlayerMoney ( randomPlayer, 1025 ) --give the player money according to the amount setTimer ( randomPlayer, 1000000, 1000 ) -- 1000 = 1 second I could be wrong. Link to comment
A7mad-78 Posted December 24, 2010 Author Share Posted December 24, 2010 local randomPlayer = getRandomPlayer ( ) outputChatBox ( getPlayerName ( randomPlayer ).." Has win 1025$ " ) givePlayerMoney ( randomPlayer, 1025 ) --give the player money according to the amount setTimer ( randomPlayer, 1000000, 1000 ) -- 1000 = 1 second I could be wrong. it's steel not working Link to comment
Kenix Posted December 24, 2010 Share Posted December 24, 2010 1000 = 1 second,show meta. Link to comment
Castillo Posted December 25, 2010 Share Posted December 25, 2010 omg volk-rus! you did it wrong lol, try this. local randomPlayer = getRandomPlayer ( ) outputChatBox ( getPlayerName ( randomPlayer ).." Has win 1025$ " ) givePlayerMoney ( randomPlayer, 1025 ) --give the player money according to the amount setTimer ( randomPlayer, 1000, 0 ) -- 1000 = 1 second 0 = how much times will the timer work (0 = infinite) Link to comment
Kenix Posted December 25, 2010 Share Posted December 25, 2010 you LOL [2010-12-25 10:22:35] WARNING: Bad argument @ 'setTimer' (string-defined function) Link to comment
Castillo Posted December 25, 2010 Share Posted December 25, 2010 i didn't even checked it, i just changed the timer arguments o_O. btw thats because he never added a function function random() local randomPlayer = getRandomPlayer ( ) outputChatBox ( getPlayerName ( randomPlayer ).." Has win 1025$ " ) givePlayerMoney ( randomPlayer, 1025 ) --give the player money according to the amount end setTimer ( random, 1000, 0 ) -- 1000 = 1 second 0 = how much times will the timer work (0 = infinite) Link to comment
Kenix Posted December 25, 2010 Share Posted December 25, 2010 work checked on the server! setTimer ( function () local randomPlayer = getRandomPlayer ( ) outputChatBox ( getPlayerName ( randomPlayer ).." Has win 1025$ " ) givePlayerMoney ( randomPlayer, 1025 ) end, 1000, 0 ) -- Put some time you want! Link to comment
Castillo Posted December 25, 2010 Share Posted December 25, 2010 so my code works now, right? Link to comment
A7mad-78 Posted December 25, 2010 Author Share Posted December 25, 2010 No no no you are understand I mean this script it's give any player a 1250$ Like a roll And it's do that again After 1 second Link to comment
Castillo Posted December 25, 2010 Share Posted December 25, 2010 now i'm totally lost, you said you wanted to give a random player $1250 every 1 second and now what are you saying?? Link to comment
Kenix Posted December 26, 2010 Share Posted December 26, 2010 Solidsnake14,he does not understand what he wants Link to comment
A7mad-78 Posted December 26, 2010 Author Share Posted December 26, 2010 Yes I wanted to give random player $1250 Every 1 second Just this And the script it's not working in my server look i want when the ranndom player has $1250 it's write on server funcitons (randomPlayer, Has win 1025$ " ) Just like that Link to comment
NotAvailable Posted December 26, 2010 Share Posted December 26, 2010 try this(server-side): function hobo() local player = getRandomPlayer ( ) givePlayerMoney(player, CASH HERE!) outputChatBox ( getPlayerName ( player ).." Won: CASH NUMBER HERE!" ) end setTimer(hobo, 1000, 0) Link to comment
Castillo Posted December 27, 2010 Share Posted December 27, 2010 jesse, volk's code and mine are the same as yours Link to comment
A7mad-78 Posted December 27, 2010 Author Share Posted December 27, 2010 Can you explain to me what u did ? Because I fix my problems with my self in next time and where is the timer are is 0 or 1000 Link to comment
Castillo Posted December 27, 2010 Share Posted December 27, 2010 1000 = TIME 0 = HOW MUCH TIMES WILL THE TIMER WORK 0 = INFINITE Link to comment
A7mad-78 Posted December 27, 2010 Author Share Posted December 27, 2010 mmmmmm Thanks man, I well Try to make a new script now 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