01.03.2018, 21:47
Use textlabel
https://sampwiki.blast.hk/wiki/Create3DTextLabel
https://sampwiki.blast.hk/wiki/Attach3DTextLabelToVehicle
https://sampwiki.blast.hk/wiki/Create3DTextLabel
https://sampwiki.blast.hk/wiki/Attach3DTextLabelToVehicle
PHP код:
CMD:veiculo (playerid, params[])
{
new Text3D:vehicle3Dtext[MAX_VEHICLES];
new String[128], Nomee[24], Model, Veiculo, Cor1, Cor2,
Float:X, Float:Y, Float:Z, Float:Angle;
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "Primeiro saia do veiculo atual.");
if(sscanf(params, "ddd", Model, Cor1, Cor2)) return SendClientMessage(playerid, -1, "Use: /veiculo (ID) (Cor1) (Cor2)");
if(IsPlayerConnected(playerid))
{
if(Model >= 400 && Model <= 611)
{
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, Angle);
Veiculo = AddStaticVehicleEx(Model, X, Y, Z, Angle, Cor1, Cor2, 30);
LinkVehicleToInterior(Veiculo, GetPlayerInterior(playerid));
SetVehicleVirtualWorld(Veiculo, GetPlayerVirtualWorld(playerid));
PutPlayerInVehicle(playerid, Veiculo, 0);
GetPlayerName(playerid, Nomee, sizeof(Nomee));
format(String, sizeof(String), "Olб %s, vocк criou o veнculo ID: %d", Nomee, Model);
SendClientMessage(playerid, -1, String);
new msgf[25];
format(msgf, sizeof(msgf), "%s(%02d) id: %d", Nomee,playerid, Veiculo); // AQUI
vehicle3Dtext[ Veiculo ] = Create3DTextLabel(msgf, -1, 0.0, 0.0, 0.0, 50.0, 0, 1 );// AQUI
Attach3DTextLabelToVehicle( vehicle3Dtext[ Veiculo ] , Veiculo, 0.0, 0.0, 0.0);// AQUI
}
else
SendClientMessage(playerid, -1, "Veiculo invбlido, use id's de 400 a 611");
}
return 1;
}