Quote:
Originally Posted by Tim_Rocks
I would try using a slider in this case, which would allow having more AP options without having to create multiple buttons, then trigger server to actually set it as Chris stated.
PHP Code:
new GuiSliderCtrl("AP_Slider") { profile = GuiBlueSliderProfile; x = 10; y = 10; width = 160; height = 20; range = {0,100}; value = 30; ticks = 10; }
|
Good idea.
Also I know it's been pointed out already, but changing AP clientside doesn't work.
If you want a simple method of a triggerserver already done then here ya go.
On the clientside when you set the ap.
Which means below //#CLIENTSIDE
PHP Code:
triggerserver("weapon", this, "AP", AP_Slider.value);
Then above //#CLIENTSIDE put this.
PHP Code:
function onActionServerSide(){
if(params[0] == "AP"){
player.ap = params[1];
}
}
Probably should of used switch and case but meur.