Jump to content
  • 0

Problema setplate


kiLLers10

Question

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

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0

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

 

 

Link to comment
Share on other sites

  • 0

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;
}

 

Link to comment
Share on other sites

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.