Raised This Month: $ Target: $400
 0% 

make vaules global?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 04-20-2005 , 16:30  
Reply With Quote #2

Code:
new Global_variable new Global_variable2 // This is where you would put global variables etc, at the top of the file after the #include //////////////////////////////////////////////////////////////////// // Start Lottery ////////////////////////////////////////////////////////////////// public cmd_startlotto(id,level,cid) {     if(!cmd_access(id,level,cid,2)) {         return PLUGIN_HANDLED;     }     // start lotto         new winningticket = random_num (0, 3)     new arg1[256];         new hudstring[256];             read_argv(1,arg1,255);                 new jackpot = str_to_num(arg1)         format(hudstring,255,"%s",lotterymsg);                 return PLUGIN_HANDLED; } //////////////////////////////////////////////////////////////////// // Buy Lotto Ticket ////////////////////////////////////////////////////////////////// public buyticket(id) {     /*if(!cmd_access(id,level,cid,1)) {     return PLUGIN_HANDLED;     }*/     new ticket = random_num(0,3)         if(haveticket = 1) { // if exceeds our array         client_print(id,print_chat,"* [Lotto] You already have lotto ticket, gotta make it fair^n");         return PLUGIN_HANDLED;     }         client_print(id,print_chat,"* [Lotto] You bought a lotto ticket^n");         return PLUGIN_HANDLED; } //////////////////////////////////////////////////////////////////// // check Lotto Ticket ////////////////////////////////////////////////////////////////// public checkticket(id) {     /*if(!cmd_access(id,level,cid,1)) {     return PLUGIN_HANDLED;     }*/             if(ticket != winningticket) { // if exceeds our array         client_print(id,print_chat,"* [Lotto] you did not win, try again next time!^n");         return PLUGIN_HANDLED;         }                 client_print(id,print_chat,"* [Lotto] YOU WON THE LOTTERY!!! CONGRATS!!!^n");         userwallet[id] += jackpot         return PLUGIN_HANDLED; }
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:54.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode