19.05.2013, 11:32
Does anyone know how to delete the textlabel?
when i use delcar and i create a new one it show both labels and its a mess..
when i use delcar and i create a new one it show both labels and its a mess..
PHP код:
CMD:vcar(playerid, params[])
{
new Float:x, Float:y, Float:z, Float:angle, str[128];
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, angle);
if(pDados[playerid][pVip] >= 1)
{
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, Red, "You'r already on a vehicle!");
VipVeh[playerid] = AddStaticVehicle(411, x, y, z, angle, -1, -1);
format(str, sizeof(str), "Vip Car of\n%s(%d)", GetName(playerid), playerid);
VipV[playerid] = Create3DTextLabel(str, Green, 0.0, 0.0, 0.0, 50.0, 0, 1);
Attach3DTextLabelToVehicle(VipV[playerid], VipVeh[playerid], 0.0, 0.0, 0.0);
PutPlayerInVehicle(playerid, VipVeh[playerid], 0);
SendClientMessage(playerid, Lime, "This is your private vip car!");
}
else
{
SendClientMessage(playerid, Red, "Yeah right...");
}
return 1;
}
PHP код:
CMD:delcar(playerid, params[])
{
if(pDados[playerid][pAdmin] >= 1)
{
new VID = GetPlayerVehicleID(playerid);
RemovePlayerFromVehicle(playerid);
DestroyVehicle(VID);
GameTextForPlayer(playerid,"~w~Vehicle ~r~Deleted",5000,5);
}
//else
return 1;
}