Jump to content

Question

Posted

Problema intalnita (descriere): Cand dat /v setplate si bag numarul nu imi mare apare .
Ero(area / rile) / warning-(ul / urile): nu primesc erori
Liniile de cod / sursa / script-ul(obligatoriu): 

	        else if(strcmp(x_nr,"setplate",true) == 0)
	        {
				if(IsPlayerInVehicle(playerid, vehid) || PlayerInfo[vehid][pPcarkey] != -1 && PlayerInfo[vehid][pPcarkey2] != -1 && PlayerInfo[vehid][pPcarkey3] != -1)
				{
			        if(cmdtext[idx++] != 32 || cmdtext[idx] == EOS)
                    {
                        SendClientMessage(playerid,0xFFFFFFAA,"USAGE: /v setplate [newplate]");
                        return 1;
				    }
				    new LabelString[128];
	                format(CarInfo[vehid][cLicense], 32 ,"%s",cmdtext[idx]);
                    SetVehicleNumberPlate(vehid,CarInfo[vehid][cLicense]);
		    		Delete3DTextLabel(Car3DLabel[vehid]);
					format(LabelString, sizeof(LabelString), "{0099FF}%s", CarInfo[vehid][cLicense]);
		    		Car3DLabel[vehid] = Create3DTextLabel( LabelString, 0xFFFFFFFF, 0.0, 0.0, 0.0, 7.0, 0, 0 );
		    		Attach3DTextLabelToVehicle( Car3DLabel[vehid], vehid, 0.0, 0.0, 0.0);
   					Update3DTextLabelText(Car3DLabel[vehid], 0x33AAFFFF, LabelString);
   					OnPropUpdate(); SavePlayerData(playerid);
	            }
	            else
	            {
                    SendClientMessage(playerid, 0xFFFFFFAA, "Nu esti in masina ta personala pentru a putea schimba NR de Inmatriculare.");
				    return 1;
			    }
			}


Imagini / Video (optional):
Ati incercat sa rezolvati singur?:  da

10 answers to this question

Recommended Posts

  • 0
Posted (edited)

Daca folosesti functia

SetVehicleNumberPlate

pune maxim 9 caractere(cu tot cu spatiu) si vezi daca merge.Acolo scrie ca ai posibilitatea de a pune maxim 32 charactere.Dar nu poti sa pui pe elicoptere,barci etc...Citeste NOTE din link-ul de mai jos.

https://wiki.sa-mp.com/wiki/SetVehicleNumberPlate

Edited by Adrian_Petre

 

 

  • 0
Posted (edited)

Trebuie sa folosesti functia SetVehicleToRespawn dupa ce ai setat numerele de inmatriculare.

 

  • The vehicle must be re-spawned or re-streamed for the changes to take effect.
Edited by Gireada

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

  • 0
Posted

deci pe masina dupa ce schimb numarul apare textul o secunda . si dupa dispare . 

forward Refresh();
public Refresh()
{
    new LabelString[256];
	for(new i;i<MAX_VEHICLES;i++)
	{
 			Delete3DTextLabel(Car3DLabel[i]);
			format(LabelString, sizeof(LabelString), "{0099FF}%s", CarInfo[i][cLicense]);
			Car3DLabel[i] = Create3DTextLabel( LabelString, 0xFFFFFFFF, 0.0, 0.0, 0.0, 7.0, 0, 0 );
			Attach3DTextLabelToVehicle( Car3DLabel[i], i, 0.0, 0.0, 0.0);
			Update3DTextLabelText(Car3DLabel[i], 0x33AAFFFF, LabelString);
	}
	return 1;
}

 

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.