Raised This Month: $ Target: $400
 0% 

Variable Help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 07-10-2006 , 19:32   Re: Variable Help
Reply With Quote #2

This should tell you how to make a basic command:
http://wiki.amxmodx.org/index.php/In...od_X_Scripting

To save a variable for each user on your server, the most common things to do is to create an array with 33 indexes and save to/read from it by passing the player id as the index.

Example:
Code:
new myVariable[33]; // this is how to create the array public set_something(id) {    myVariable[id] = 1; // this is how to set the value } public check_something(id) {    client_print(id,print_chat,"Your variable is: %i",myVariable[id]); // this is how to read the value }
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
 



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 07:58.


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