Speed
#3

PHP код:
CMD:ssb(playerid,params[]) 

  new 
Float:boost
  new 
strBoostMultiplier[256]; 
  new 
strTempString[267]; 
  if(
sscanf(params,"f",boost)) 
  { 
            
SendClientMessage(playeridCOLOR_MESSAGE_YELLOW"** Usage: /setspeedboost <SpeedBoostMultiplier>"); 
            
SendClientMessage(playeridCOLOR_MESSAGE_YELLOW"*  Allows you to set the speed boost multiplier that is applied when you press the horn key."); 
            
SendClientMessage(playeridCOLOR_MESSAGE_YELLOW"*  Accepted speed boost multiplier values are between 1.0 and 3.0"); 
            
SendClientMessage(playeridCOLOR_MESSAGE_YELLOW"*  The shortcut for this command is: /ssb"); 
            return 
1
  } 
        new 
Float:BoostMultiplier floatstr(strBoostMultiplier); 

        
// Check speed boost multiplier is not too high or low 
        
if (boost =< 1.0 || boost >= 3.0
        { 
              
// Send message and exit here 
            
SendClientMessage(playeridCOLOR_MESSAGE_YELLOW"* Sorry, you must enter a speed boost multiplier between 1.0 and 3.0"); 
            return 
1
          } 
          
SpeedBoostMultiplier[playerid] = boost
          
format(strTempString,sizeof(strTempString), "* You set your speed boost multiplier to %0.2f"SpeedBoostMultiplier[playerid]); 
        
SendClientMessage(playeridCOLOR_MESSAGE_YELLOWstrTempString); 
           
return 
1

Reply


Messages In This Thread
Speed - by Loinal - 10.08.2016, 13:42
Re: Speed - by AbyssMorgan - 10.08.2016, 13:44
Re: Speed - by Luicy. - 10.08.2016, 13:50
Re: Speed - by Loinal - 18.08.2016, 23:18
Re: Speed - by WrathOfGenesis - 19.08.2016, 08:39

Forum Jump:


Users browsing this thread: 1 Guest(s)