3D Text Label Help ! -
Hash [NL-RP] - 14.07.2010
Alright i created a 3D Text label above all cars, as their license plate, when i go the vehicle shop and /v buyplate
the plate will appear in /stats buy wont show upon the text draw till next restart, how can i make the text draw update straight away. Im new to text draws so please give me a step by step guide. Thanks
Re: 3D Text Label Help ! -
MadeMan - 14.07.2010
Use this on /v buyplate
https://sampwiki.blast.hk/wiki/Update3DTextLabelText
Re: 3D Text Label Help ! -
Hash [NL-RP] - 14.07.2010
Quote:
Originally Posted by MadeMan
|
I tried that but cant get it working, what shall i use from there ?
(CarLabel: i, 0x00FF00FF, "%d", CarInfo[i][cPlate])
Like that ?
Re: 3D Text Label Help ! -
MadeMan - 14.07.2010
Show your /v buyplate code.
Re: 3D Text Label Help ! -
Hash [NL-RP] - 14.07.2010
Код:
if(strcmp(x_nr,"buyplate",true) == 0)
{
if(IsAtDealership(playerid))
{
if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey] || GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2] || GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey3])
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new ownvehkey;
if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey]) { ownvehkey = PlayerInfo[playerid][pPcarkey]; }
else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { ownvehkey = PlayerInfo[playerid][pPcarkey2]; }
else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey3]) { ownvehkey = PlayerInfo[playerid][pPcarkey3]; }
else { return 1; }
if(strcmp(sendername, CarInfo[ownvehkey][cOwner], true) == 0)
{
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
SafeGivePlayerMoney(playerid, -3000);
new plate = 1000000 + random(8999999);//minimum 1000 max 9999
CarInfo[ownvehkey][cPlate] = plate;
format(string, sizeof(string), "[NEW PLATE] : %d",CarInfo[ownvehkey][cPlate]);
SendClientMessage(playerid, COLOR_GRAD4, string);
SendClientMessage(playerid, COLOR_GRAD5, "You can check this at anytime by typing /stats");
SendClientMessage(playerid, COLOR_WHITE, "You have now purchased a new plate");
format(string, sizeof(string), "The plate cost $3000");
SendClientMessage(playerid, COLOR_WHITE, string);
SetTimer("Plate", 2000, 0);
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You have to sit in your own car to buy a plate ");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You are not at a dealership");
return 1;
}
Re: 3D Text Label Help ! -
MadeMan - 14.07.2010
And how you create the 3D Text Label?
Re: 3D Text Label Help ! -
willsuckformoney - 14.07.2010
Quote:
Originally Posted by MadeMan
And how you create the 3D Text Label?
|
just a little tip, normally when they stop posting or helping, either they don't care no moar or they don't know how to help
Re: 3D Text Label Help ! -
Hash [NL-RP] - 14.07.2010
Quote:
Originally Posted by MadeMan
And how you create the 3D Text Label?
|
for(new i = 0; i < MAX_VEHICLES; i++)
{
if(CarInfo[i][cOwned] == 1)
{
Delete3DTextLabel(CarLabel);
format(PropertyString,sizeof(PropertyString),"%d", CarInfo[i][cPlate]);
CarLabel = Create3DTextLabel(PropertyString ,0x00FF00FF,CarInfo[i][cAngle], CarInfo[i][cPlate],CarInfo[i][cPlate],10, 0);
}
}
Re: 3D Text Label Help ! -
MadeMan - 14.07.2010
pawn Код:
new Text3D:CarLabels[MAX_VEHICLES];
pawn Код:
for(new i = 0; i < MAX_VEHICLES; i++)
{
if(CarInfo[i][cOwned] == 1)
{
format(PropertyString,sizeof(PropertyString),"%d", CarInfo[i][cPlate]);
CarLabels[i] = Create3DTextLabel(PropertyString ,0x00FF00FF,CarInfo[i][cAngle], CarInfo[i][cPlate],CarInfo[i][cPlate],10, 0);
}
}
add to "/v buyplate" command
pawn Код:
format(string, sizeof(string), "%d", CarInfo[ownvehkey][cPlate]);
Update3DTextLabelText(CarLabels[ownvehkey], 0x00FF00FF, string);
Re: 3D Text Label Help ! -
Hash [NL-RP] - 14.07.2010
Quote:
Originally Posted by MadeMan
And how you create the 3D Text Label?
|
Quote:
Originally Posted by MadeMan
pawn Код:
new Text3D:CarLabels[MAX_VEHICLES];
pawn Код:
for(new i = 0; i < MAX_VEHICLES; i++) { if(CarInfo[i][cOwned] == 1) { format(PropertyString,sizeof(PropertyString),"%d", CarInfo[i][cPlate]); CarLabels[i] = Create3DTextLabel(PropertyString ,0x00FF00FF,CarInfo[i][cAngle], CarInfo[i][cPlate],CarInfo[i][cPlate],10, 0); } }
add to "/v buyplate" command
pawn Код:
format(string, sizeof(string), "%d", CarInfo[ownvehkey][cPlate]); Update3DTextLabelText(CarLabels[ownvehkey], 0x00FF00FF, string);
|
It still wont work