sscanf multiple paramteres usage
#3

PHP код:
new action[5], quantity;
if(!
sscanf(params"s[5]i"actionquantity)) {
   if(!
strcmp(action"take")) {
      
// /trunk take /quantitity/
   
}
   else if(!
strcmp(action"put")) {
      
// /trunk put /quantitity/
   
}
   else
      
SendClientMessage(playerid0xCC0000FF"Usage: /trunk [take/put] [quantity]");
}
else if(!
sscanf(params"s[5]"action)) {
   if(!
strcmp(action"take")) {
      
SendClientMessage(playerid0xCC0000FF"Usage: /trunk take [quantity]");
   }
   else if(!
strcmp(action"put")) {
      
SendClientMessage(playerid0xCC0000FF"Usage: /trunk put [quantity]");
   }
   else if(!
strcmp(action"show")) {
      
// /trunk show
   
}
   else
      
SendClientMessage(playerid0xCC0000FF"Usage: /trunk[ put/take/show]");

Enjoy.
Reply


Messages In This Thread
sscanf multiple paramteres usage - by Ripster - 01.08.2016, 18:40
Re: sscanf multiple paramteres usage - by J0sh... - 01.08.2016, 18:41
Re: sscanf multiple paramteres usage - by Luicy. - 01.08.2016, 18:46
Re: sscanf multiple paramteres usage - by Ripster - 01.08.2016, 18:57
Re: sscanf multiple paramteres usage - by Konstantinos - 01.08.2016, 19:14
Re: sscanf multiple paramteres usage - by Stinged - 01.08.2016, 19:21

Forum Jump:


Users browsing this thread: 1 Guest(s)