[HELP] Creating optional command parameters
#2

I think this code would work
Код:
if(!sscanf(params, "ddd", vID, cID,cID2))
{
	 //code here if player write the optional color
}
else if(!sscanf(params, "d", vID))
{
	//same code here with random colours
}
else return SendClientMessage(playerid, COLOR_GREENYELLOW, "USAGE: /car [modelid] [colour1 optional] [colour2 optional]");
Reply


Messages In This Thread
[HELP] Creating optional command parameters - by Nabster - 08.03.2015, 07:41
Re: [HELP] Creating optional command parameters - by X337 - 08.03.2015, 07:51
Re: [HELP] Creating optional command parameters - by biker122 - 08.03.2015, 08:20
Re: [HELP] Creating optional command parameters - by Nabster - 08.03.2015, 09:00

Forum Jump:


Users browsing this thread: 1 Guest(s)