/vehcolor CMD Problem.
#1

Good Morning Everyone!.
I would like to know why is this script not working? The color doesn't changes properly.

Код:
if (strcmp("/vehcolor", cmd, true) == 0)
	{
		new Color1[128];
	    new Color2[128];
	    new currentveh;
	    Color1 = strtok(cmdtext, idx);
	    Color2 = strrest(cmdtext, idx);
	    currentveh = GetPlayerVehicleID(playerid);
	    if(!IsPlayerInVehicle(playerid, currentveh))
	    {
			SendClientMessage(playerid, COLOR_RED,"You must be in a vehicle to do this action!");
			return 1;
		}
	  	if (strval(Color1) > 255)
	  	{
	    SendClientMessage(playerid, COLOR_RED, "Invalid Color ID");
	    return 1;
	 }
	 if (strval(Color2) > 255)
   	 {
   	  	SendClientMessage(playerid, COLOR_RED, "Invalid Color ID");
	   	return 1;
   	 }
   	 else
   	 {
   	     new string[128];
		 ChangeVehicleColor(currentveh, strval(Color1), strval(Color2));
		 format(string,sizeof(string),"Your car color have been changed to (ID: %d) and (ID: %d)", strval(Color1), strval(Color2));
		 SendClientMessage(playerid, COLOR_GREEN, string);
		 return 1;
  	 }
  	 }
Reply


Messages In This Thread
/vehcolor CMD Problem. - by TitanForceGeneral - 16.08.2015, 10:35
Re: /vehcolor CMD Problem. - by LetsOWN[PL] - 16.08.2015, 10:46
Re: /vehcolor CMD Problem. - by ZToPMaN - 16.08.2015, 10:57
Re: /vehcolor CMD Problem. - by TitanForceGeneral - 16.08.2015, 11:12
Re: /vehcolor CMD Problem. - by Denying - 16.08.2015, 11:13
Re: /vehcolor CMD Problem. - by MarvinPWN - 16.08.2015, 11:13
Re: /vehcolor CMD Problem. - by TitanForceGeneral - 16.08.2015, 11:15
Re: /vehcolor CMD Problem. - by MarvinPWN - 16.08.2015, 11:17
Re: /vehcolor CMD Problem. - by TitanForceGeneral - 16.08.2015, 11:23
Re: /vehcolor CMD Problem. - by Denying - 16.08.2015, 11:29

Forum Jump:


Users browsing this thread: 2 Guest(s)