SA-MP Forums Archive
3dtext numberplate help need.. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: 3dtext numberplate help need.. (/showthread.php?tid=277052)



3dtext numberplate help need.. - antsolen - 16.08.2011

I have
Код:
public OnVehicleSpawn(vehicleid)
{
for(new vehid; vehid < MAX_VEHICLES; vehid++)
{
new message[128];
format(message,sizeof(message), "DLRP %i1", vehid);
VehicleLicense[vehid] = Create3DTextLabel(message, 0xD40000AA, 0.2, 0.2, 0.2, 50.0, 0, 1);
Attach3DTextLabelToVehicle(VehicleLicense[vehid], vehid, 0.2, 0.2, 0.2);
}
return 1;
}
But how to make , that to DLRP comes random 4 letters ?


Re: 3dtext numberplate help need.. - wups - 16.08.2011

Quote:
Originally Posted by antsolen
Посмотреть сообщение
I have
Код:
public OnVehicleSpawn(vehicleid)
{
for(new vehid; vehid < MAX_VEHICLES; vehid++)
{
new message[128];
format(message,sizeof(message), "DLRP %i1", vehid);
VehicleLicense[vehid] = Create3DTextLabel(message, 0xD40000AA, 0.2, 0.2, 0.2, 50.0, 0, 1);
Attach3DTextLabelToVehicle(VehicleLicense[vehid], vehid, 0.2, 0.2, 0.2);
}
return 1;
}
But how to make , that to DLRP comes random 4 letters ?

pawn Код:
public OnVehicleSpawn(vehicleid)
{
new message[24];
format(message,sizeof(message), "%c%c%c%c %i1",(65+random(26)),(65+random(26)),(65+random(26)), vehid);
VehicleLicense[vehid] = Create3DTextLabel(message, 0xD40000AA, 0.2, 0.2, 0.2, 50.0, 0, 1);
Attach3DTextLabelToVehicle(VehicleLicense[vehid], vehid, 0.2, 0.2, 0.2);
return 1;
}
Why don't you search?
Anyway you should use SetVehicleNumberPlate.

pawn Код:
public OnVehicleSpawn(vehicleid)
{
new message[24];
format(message,sizeof(message), "%c%c%c%c %i1",(65+random(26)),(65+random(26)),(65+random(26)), vehid);
SetVehicleNumberPlate(vehicleid,message);
return 1;
}



Re: 3dtext numberplate help need.. - antsolen - 16.08.2011

Quote:
Originally Posted by wups
Посмотреть сообщение
[pawn]
pawn Код:
public OnVehicleSpawn(vehicleid)
{
new message[24];
format(message,sizeof(message), "%c%c%c%c %i1",(65+random(26)),(65+random(26)),(65+random(26)), vehid);
SetVehicleNumberPlate(vehicleid,message);
return 1;
}
Im getting 2 errors -.-


Re: 3dtext numberplate help need.. - Shockey HD - 16.08.2011

Quote:
Originally Posted by antsolen
Посмотреть сообщение
Im getting 2 errors -.-
Those errors are?