Making vehicle health with 3dtext label.
#2

Use ingame /dl
Try it, don't make any commands. Just typ /dl.

Oh wait, no, then you only see it yourself.
Whatever, I'm gonna make a fast script (idk if its gonna work). I'll edit this msg. please wait

pawn Код:
//Here ya go
#include <a_samp>

#define FILTERSCRIPT

new Text3D:VehHealth[MAX_VEHICLES];

#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
    return 1;
}
#else
main()
{
    return 1;
}
public OnGameModeInit()
{
    return 1;
}
#endif

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/vehhealthon", true))
    {
        new string[128];
        new Float:vX, Float:vY, Float:vZ;
        GetVehiclePos(GetPlayerVehicleID(playerid), vX, vY, vZ);
        format(string, 128, "%f", GetVehicleHealth(GetPlayerVehicleID(playerid)));
        VehHealth[GetPlayerVehicleID(playerid)] = Create3DTextLabel(string, 0xFFFFFFAA, vX, vY, vZ, 50, -1, 0);
        Attach3DTextLabelToVehicle(VehHealth[GetPlayerVehicleID(playerid)], GetPlayerVehicleID(playerid), 0.0, 0.0, 1.5);
    }
    return 1;
}
Try that :P
idk if it's working. I don't work with 3D text labels
Reply


Messages In This Thread
Making vehicle health with 3dtext label. - by ZamaXor - 06.11.2010, 22:20
Re: Making vehicle health with 3dtext label. - by Kwarde - 07.11.2010, 07:04
Re: Making vehicle health with 3dtext label. - by (SF)Noobanatior - 07.11.2010, 07:58
Re: Making vehicle health with 3dtext label. - by Kwarde - 07.11.2010, 08:08
Re: Making vehicle health with 3dtext label. - by -Rebel Son- - 07.11.2010, 12:56

Forum Jump:


Users browsing this thread: 1 Guest(s)