Random const?
I'm trying to get random consts to work
Code:
'Error: Number of arguments does not match definition on line 142' Oh and as for a side note, there's alot of different ways to set up a menu, what would be the most 'optimized' way? |
Re: Random const?
:D Ok well this time Im going to show everyone how to make a menu , and make it support multiple languges , and text from file . So first let me begin by saying , If you arnt famailar with amxmodx scripting read over my tutorials 1 and 2 before reading this one . Im going to asume you know the basices of the codeing .
Ok first like the rest of our scripts were going to make our includes . Menu are pretty much covered by amxmodx and misc . So no other modules are needed to make a menu . Code:
#include <amxmodx>Code:
new keys = MENU_KEY_0 | MENU_KEY_1 | MENU_KEY_2 | MENU_KEY_3 | MENU_KEY_4 | MENU_KEY_5 | MENU_KEY_6 | MENU_KEY_7 | MENU_KEY_8 | MENU_KEY_9Code:
public plugin_init()Code:
public my_menu(id)%L Means we are calling to a Lang file (the dictioanry we registered earlier) , LANG_PLAYER meens were translating into the language of the current player . We could use the servers language which is LANG_SERVER . Next were calling "HI" , which is in the txt file . In the txt file youll see Code:
[en] //this meens english return PLUGIN_CONTINUE meens functions will keep going . The show menu function is what will actually make the menu display . id , keys and menu are already defined . so next the -1 means that we wont specify a set time for the menu to be displayed .The the menu that will be dispayed . Next up is what happens when some one make a choice from the menu Code:
public next_menu(id , key ) // this is the function called when a chioce is made last param from register_menucd[en] = english [es] = spanish [de] = german so on and so forth . for a full list , go and get your languages file from the amxmodx/data/lang folder . It has all the languages and symbols it supports . So here is our full code Code:
/* Plugin generated by AMXX-Studio */Code:
[en] |
Re: Random const?
Code:
Also you have Code:
|
Re: Random const?
Ah, thank you. Both of you.
|
Re: Random const?
With the 'fixed version' of teame, I got sometimes an error (I don't know it right now).
Right now, I use the following code. It doesn't throw an error, but prints just some random letters from the array. PHP Code:
|
| All times are GMT -4. The time now is 04:51. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.