Attach Textdraw on Inside Vehicle
#3

I guess you mean 3DTextLabel since textdraws cant be 'attached' to anything.

Here is a basic example with zcmd and sscanf2. You should be able to figure out how to make a delete CMD if you wish

pawn Код:
new Text3D:Label[MAX_VEHICLES]; //defining the Label for everyone vehicle so we can delete it later if needed

CMD:vehtext(playerid, params[])
{
    if(youradminvariable < 4) return 0;
    new text[50];
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "You need to be in a vehicle!"); //checking if the player is inside any vehicle
    if(sscanf(params, "s[50]", text)) return SendClientMessage(playerid, -1, "Correct usage: /vehtext [text]");
    new car = GetPlayerVehicleID(playerid); //getting the player vehicleid and storing it in a variable
    Label[car] = Create3DTextLabel(text, 0xFF0000FF, 0, 0, 0, 50.0, 0, 1); //creating the label with the text that you typed
    Attach3DTextLabelToVehicle(Label[car], car, 0, 0, 0); //attacking it to the vehicle
}
Reply


Messages In This Thread
Attach Textdraw on Inside Vehicle - by [IND]Crazy - 27.06.2013, 09:51
Re: Attach Textdraw on Inside Vehicle - by dannyk0ed - 27.06.2013, 10:17
Re: Attach Textdraw on Inside Vehicle - by TheOnlyRealFuzzy - 27.06.2013, 10:22
Re: Attach Textdraw on Inside Vehicle - by [IND]Crazy - 27.06.2013, 10:39
Re: Attach Textdraw on Inside Vehicle - by GeniusPobs - 27.06.2013, 10:47
Re: Attach Textdraw on Inside Vehicle - by [IND]Crazy - 27.06.2013, 11:05
Re: Attach Textdraw on Inside Vehicle - by dannyk0ed - 27.06.2013, 11:29
Re: Attach Textdraw on Inside Vehicle - by [IND]Crazy - 27.06.2013, 11:40

Forum Jump:


Users browsing this thread: 1 Guest(s)