problem with numberplate
#6

I solved the problem. It doesn't alterate the next car, but now the only problem is that it saves just 8 chars. I type "LS-96-MRK" and it shows LS-96-MR.
The codes are:
Код:
cPlate[16], at CarInfo
The cmd is:
Код:
if (strcmp(cmd, "/changeplate", true, 12)==0)
	{
	    cmd = strtok(cmdtext, idx);
		if(!strlen(cmd))
		{
	        SendClientMessage(playerid, 0xFFFFFFAA, "USAGE: /changeplate [numar. foloseste '-' pentru spatiu]");
			return 1;
	    }
   		if(IsPlayerInAnyVehicle(playerid) == 1)
		{
            if(!IsACop(playerid))
	        {
	            SendClientMessage(playerid, COLOR_GREY, " Nu esti politist!");
	            return 1;
	        }
		   SetVehicleNumberPlate(GetPlayerVehicleID(playerid), cmd);
		   new vehid=GetPlayerVehicleID(playerid);
		   strmid(CarInfo[vehid][cPlate], cmd, 0, 16, strlen(cmd));
		   SetVehicleToRespawn(vehid);
		   SendClientMessage(playerid, 0xFF9900AA, "Numar schimbat!");
		   new Float:x;
		   new Float:y;
		   new Float:z;
		   GetPlayerPos(playerid, x, y, z);
		   SetVehiclePos(vehid, x+5, y, z);
		   return 1;
		}
				else
				{
				    SendClientMessage(playerid, 0xFF9900AA, "Nu esti intr-o masina.");
				}
	    return 1;
	}
At LoadCar()
Код:
strmid(CarInfo[idx][cPlate], arrCoords[13], 0, strlen(arrCoords[13]), 16);
Edit: I tried LS96MRK and it saves just LS96MR. I think it saves just 4 letters.
Reply


Messages In This Thread
problem with numberplate - by pantelimonfl - 22.01.2011, 12:17
Re: problem with numberplate - by pantelimonfl - 22.01.2011, 16:40
Re: problem with numberplate - by pantelimonfl - 22.01.2011, 19:53
Re: problem with numberplate - by Typhome - 22.01.2011, 20:23
Re: problem with numberplate - by pantelimonfl - 22.01.2011, 20:25
Re: problem with numberplate - by pantelimonfl - 23.01.2011, 12:09
Respuesta: problem with numberplate - by [DOG]irinel1996 - 23.01.2011, 12:36
Re: problem with numberplate - by pantelimonfl - 23.01.2011, 16:37
Re: problem with numberplate - by pantelimonfl - 24.01.2011, 18:04
Re: problem with numberplate - by Joe Staff - 24.01.2011, 18:16

Forum Jump:


Users browsing this thread: 1 Guest(s)