problem in color of /createfcar
#3

Try this :

Код:
"/createfcar", true) == 0)
			{
				if(PlayerInfo[playerid][pAdmin] < 7)
				{
					return SendClientMessage(playerid, COLOR_GREY," You're not authorized to use that command !");
				}
				new fvfam, fvcar, fvcol1, fvcol2;
				tmp = strtok(cmdtext, idx);
				fvfam = strvalEx(tmp);
				tmp = strtok(cmdtext, idx);
				if(fvfam < 1 || fvfam > 14 || !strlen(tmp))
				{
					return SendClientMessage(playerid, COLOR_GREY," USAGE: /createfcar [familyid] [car name/id] [color1] [color2]");
				}
				fvcar = ReturnVehicleModelID(tmp);
				if(!fvcar)
				{
					return SendClientMessage(playerid, COLOR_GREY," USAGE: /createfcar [familyid] [car name/id] [color1] [color2]");
				}
			//	new fvcol1, fvcol2;
				tmp = strtok(cmdtext, idx);
				if(!strlen(tmp))
				{
					fvcol1 = -1;
					fvcol2 = -1;
				}
				else
				{
					fvcol1 = strval(tmp);
					if(fvcol1 < -1 || fvcol1 > 200)
						return SendClientMessage(playerid, COLOR_GREY, "   Enter a valid color [0-200]");

					tmp = strtok(cmdtext, idx);
					if(!strlen(tmp)) fvcol2 = fvcol1;
					else fvcol2 = strval(tmp);
					if(fvcol2 < -1 || fvcol2 > 200)
						return SendClientMessage(playerid, COLOR_GREY, "   Enter a valid color [0-200]");
				}
				tmp = strtok(cmdtext, idx);
				fvcol1 = strvalEx(tmp);
				tmp = strtok(cmdtext, idx);
				fvcol2 = strvalEx(tmp);
				if(fvcol1 == -1) fvcol1 = 200;
				if(fvcol2 == -1) fvcol2 = 200;
				new Float:ffvX, Float:ffvY, Float:ffvZ, Float:ffvRot;
				GetPlayerPos(playerid, ffvX, ffvY, ffvZ);
				GetPlayerFacingAngle(playerid, ffvRot);
				for(new fv=0;fv<MAX_FAMVEHICLES;fv++)
				{
					if(fv == MAX_FAMVEHICLES-1 && fVehicleInfo[fv][fvModel] != 0)
					{
						return SendClientMessage(playerid, COLOR_GREY," Server has reached limit for family cars !");
					}
					if(fVehicleInfo[fv][fvModel] != 0) continue;
					fVehicleInfo[fv][fvX] = ffvX;
					fVehicleInfo[fv][fvY] = ffvY;
					fVehicleInfo[fv][fvZ] = ffvZ+1.5;
					fVehicleInfo[fv][fvRot] = ffvRot;
					fVehicleInfo[fv][fvModel] = fvcar;
					fVehicleInfo[fv][fvFam] = fvfam-1;
					fVehicleInfo[fv][fvCol1] = fvcol1;
					fVehicleInfo[fv][fvCol2] = fvcol2;
					fVehicleInfo[fv][fvLocked] = 1;
					fVehicleInfo[fv][fvID] = CreateVehicle(fvcar, ffvX,ffvY,ffvZ,ffvRot,fvcol1,fvcol2,-1);
					LockCar(fVehicleInfo[fv][fvID]);
					PutPlayerInVehicle(playerid, fVehicleInfo[fv][fvID], 1);
					break;
				}
				new fvstring[256];
				format(fvstring,sizeof(fvstring)," Created family car for family '%s'", FamilyInfo[fvfam-1][FamilyName]);
				SendClientMessage(playerid, COLOR_GREY, fvstring);
				SaveFamVehicles();
				return 1;
			}
Reply


Messages In This Thread
problem in color of /createfcar - by Jes - 12.12.2013, 04:21
Re: problem in color of /createfcar - by Jes - 12.12.2013, 06:06
Re: problem in color of /createfcar - by OnY - 12.12.2013, 06:17
Re: problem in color of /createfcar - by Jes - 12.12.2013, 06:39
Re: problem in color of /createfcar - by OnY - 12.12.2013, 06:41
Re: problem in color of /createfcar - by Jes - 12.12.2013, 07:17

Forum Jump:


Users browsing this thread: 1 Guest(s)