Label wird net auf dem Car angezeigt!
ocmd:newcar(playerid,params[])
{
new Float:vehx,Float:vehy,Float:vehz;
new vehid,cc1,cc2,string[128],Text3D:vehicle;
if(sscanf(params,"iii",vehid,cc1,cc2))return SendClientMessage(playerid, ROT,"INFO: /newcar [CAR-ID] [COLOR 1] [COLOR 2]");
if(isPlayerAnAdmin(playerid,1))
{
GetVehiclePos(vehid,vehx,vehy,vehz);
format(string,sizeof(string),"Admincar von %S",playerid);
vehicle = Create3DTextLabel(string,ROT,vehx,vehy,vehz,50.0,0,0);
Attach3DTextLabelToVehicle(vehicle,vehid, 0.0, 0.0, 0.75);
new name[MAX_PLAYER_NAME];
GetPlayerPos(playerid,vehx,vehy,vehz);
new carid = CreateVehicle(vehid,vehx,vehy,vehz,3,cc1,cc2,-1);
GetPlayerName(playerid,name, sizeof(name));
format(string,sizeof(string),"T:%s",name);
SetVehicleNumberPlate(carid,string);
PutPlayerInVehicle(playerid, carid, 0);
format(string,sizeof(string),"Du hast ein Admincar gespawnt!");
SendClientMessage(playerid,BLAU,string);
}
else
{
SendClientMessage(playerid,ROT,"Diesen Befehl kannst du nicht nutzen. Mindestens benötigter Rang: {00FF5A}Supporter");
}
return 1;
}