SA-MP Forums Archive
/colourcar - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /colourcar (/showthread.php?tid=532969)



/colourcar - DragoA - 21.08.2014

How does one do it?

I got this far:

Quote:

if(strcmp(cmdtext,"/colourcar",true)==0)
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFFFFFFFF, "You are not in a vehicle!");

ChangeVehicleColor(vehicleid,)




Re: /colourcar - billy123321 - 21.08.2014

It would be a lot easier if you would use sscanf & zcmd.


Re: /colourcar - DragoA - 21.08.2014

Is there no way to do it in just pawno?


Re: /colourcar - ball - 21.08.2014

Код:
public OnGameModeInit()
{
	new theParams[8] = "22 18", theTable[8], theCharacter, theColor[2];

	theCharacter = strfind(theParams, " ");
	strmid(theTable, theParams, 0, theCharacter);

	theColor[0] = strval(theTable);
	theColor[1] = strval(theParams[theCharacter]);
	printf("%d %d", theColor[0], theColor[1]);
}
Small hint for your code - all you have to do is copy this to your command and change names of variables.


Re: /colourcar - DragoA - 21.08.2014

Sorry, but that confused me, a lot.