View Single Post
  #8  
Old 08-21-2012, 08:48 AM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
Quote:
Originally Posted by Tim_Rocks View Post
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;
  
10;
  
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.
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion
Reply With Quote