car color
#1

Hello i have this command to change the vehicle color its work fine but i want if the player didnt type the color2 it will just change the color1 how can i do that

PHP код:
CMD:vc(playerid,params[])
{
  new 
color1color2;
  if(!
IsPlayerAdmin(playerid)) return SendClientMessage(playerid,Red,"UnKnwon Command! Type /cmds");
  if(
sscanf(params"dd",color1,color2)) return SendClientMessage(playerid,Red,"Change vehicle color: /vc <color1> <color2>");
  if(
IsPlayerInAnyVehicle(playerid))
  {
    
ChangeVehicleColor(GetPlayerVehicleID(playerid),color1,color2);
  }
  else
  {
    
SendClientMessage(playerid,Red,"You are not in vehicle");
  }
  return 
1;

Reply


Messages In This Thread
car color - by BoU3A - 09.11.2014, 15:30
Re: car color - by dazman14 - 09.11.2014, 15:39
Re: car color - by HY - 09.11.2014, 15:43
Re: car color - by BoU3A - 09.11.2014, 15:49
Re: car color - by dazman14 - 09.11.2014, 15:51
Re: car color - by DavidBilla - 09.11.2014, 15:54

Forum Jump:


Users browsing this thread: 1 Guest(s)