SA-MP Forums Archive
Problem with 3dtext - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Problem with 3dtext (/showthread.php?tid=256402)



Problem with 3dtext - Im_BanK - 20.05.2011

Hy there.

I have a problem trying to implement a 3dtext.
Im geting this warnings:

pawn Код:
E:\Utilitare\Programe Instalate\samp03csvr_R2-2_win32\filterscripts\carownership.pwn(433) : warning 213: tag mismatch
E:\Utilitare\Programe Instalate\samp03csvr_R2-2_win32\filterscripts\carownership.pwn(434) : warning 213: tag mismatch
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Warnings.
and the code is:

pawn Код:
public OnFilterScriptInit()
{
    printf("Filterscript [FS]CarOwnership.amx Initiated\n");
    LoadCar();
    for(new h = carsonserver; h < sizeof(CarInfo); h++)
    {
        AddStaticVehicleEx(CarInfo[h][cModel],CarInfo[h][cLocationx],CarInfo[h][cLocationy],CarInfo[h][cLocationz]+1.0,CarInfo[h][cAngle],CarInfo[h][cColorOne],CarInfo[h][cColorTwo],60000);
        new string[128];
        new textt;
        format(string, sizeof(string), "%s's Vehicle", CarInfo[h][cOwner]);
        textt = Create3DTextLabel(string,COLOR_GRAD4,CarInfo[h][cLocationx],CarInfo[h] //fist warning is here[cLocationy],CarInfo[h][cLocationz],30.0,0);
        Attach3DTextLabelToVehicle(textt, h, CarInfo[h][cLocationx],CarInfo[h][cLocationy],CarInfo[h] // second is here[cLocationz]);
        LoadComponents(h);
    }
    return 1;
}
what can i do.
im trying to make a 3dtext for cars to show the owners name attached to the vehicle.

any ideeas?


Re: Problem with 3dtext - Ash. - 20.05.2011

You are creating 3D Text Labels, so your "new" variable declaration should look like this:

pawn Код:
new Text3D:textt;
//"Text3D:" tells the script that the variable will be used to store information about a 3D Text Label



Re: Problem with 3dtext - Im_BanK - 20.05.2011

It's working but how can i make that 3dtext to be attached to the vehicle all the time?
Right now is creating near the car but when im moveing the car the text remains there where my car was.
How can i make it follow the car?


Re: Problem with 3dtext - Im_BanK - 21.05.2011

NVM that.
Now im wondering how can i create a vehicle to a vehicle ID.
If you know the command /vehid it shows the vehicle ID of the car your IN.
for ex: i want to create a car to vehicle ID 200.

is that possible?


Re: Problem with 3dtext - Toreno - 21.05.2011

I don't think so, it's automatically I guess.


Re: Problem with 3dtext - Sascha - 21.05.2011

as far as I know that's not possible...
whenever a vehicle is added, assign it to the last added ID + 1...
You can only reset that by restarting the server as far as I know..


Re: Problem with 3dtext - Im_BanK - 21.05.2011



Or how can i Create a car in a filterscript to the last AddstaticVehicleEx from Gamemode.
For example i have my last car in GM to vehid 200.
How can i make the filterscript to create the car to 201?

i want the filterscript to calculate the vehicles inside my gamemode and place the filterscript car to the last addstaticvehicle inside the Gamemode.

is this possible?


Re: Problem with 3dtext - Sascha - 21.05.2011

the server does that automatically...


"This forum requires that you wait 120 seconds between posts. Please try again in 78 seconds." << gotta hate that


Re: Problem with 3dtext - Im_BanK - 21.05.2011

it's not.
Im creating a vehicle and it saves inside cars.cfg.
After that i restart the server but the car is not Created at the Last Vehicle ID.
Is Created first.

Why is that?
bec is a filterscript and load first and gm second or what?

how can i make it to be created at Last Vehicle ID?
i can show you the filterscript.But then everyone will use it.
that is the only problem i have with it.


Re: Problem with 3dtext - Sascha - 21.05.2011

correct: the filterscripts loads before the gamemode loaded the vehicles..
you can use this:
pawn Код:
public OnGameModeInit()
{
  ...................all your code and at the end
  SendRconCommand("loadfs yourfilterscript");
  return 1;
}
public OnGameModeExit()
{
  SendRconCommand("unloadfs yourfilterscript");
  return 1;
}