SA-MP Forums Archive
adding a name into Attach3dtextlabeltovehicle - 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: adding a name into Attach3dtextlabeltovehicle (/showthread.php?tid=191399)



adding a name into Attach3dtextlabeltovehicle - Haydz - 19.11.2010

fixed..,


Re: adding a name into Attach3dtextlabeltovehicle - PowerPC603 - 19.11.2010

pawn Код:
format(string, sizeof(string), "Dodo Owner:\n %s",pname);
vehicle3Dtext = Create3DTextLabel(string, 0xFFFF00FF, 0.0, 0.0, 0.0, 50.0, 0, 1 );



Re: adding a name into Attach3dtextlabeltovehicle - Haydz - 19.11.2010

cheers, 2 warnings tho and the 3d text doesn't show ingame.

pawn Код:
C:\Documents and Settings\Hayden Bruin\Desktop\UlitmateDM\gamemodes\SAP.pwn(2553) : warning 204: symbol is assigned a value that is never used: "dodo"
C:\Documents and Settings\Hayden Bruin\Desktop\UlitmateDM\gamemodes\SAP.pwn(2555) : warning 204: symbol is assigned a value that is never used: "vehicle3Dtext"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Warnings.
pawn Код:
case 0:
            {
                if( GetPlayerMoney(playerid)  <  500000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to pay for this!");
                GivePlayerMoney(playerid, -500000);
                new pname[24];
                new string[100];
                GetPlayerName(playerid,pname,24);
                format(string,sizeof(string), "%s has bought a Dodo for $500,000",pname);
                SendClientMessageToAll(COLOR_WHITE,string);
                dodo = AddStaticVehicleEx(593, 411.6404, 2502.3083, 16.9489, 88.9549,1,1,30000);
                format(string, sizeof(string), "Dodo Owner:\n %s",pname);
                vehicle3Dtext = Create3DTextLabel(string, 0xFFFF00FF, 0.0, 0.0, 0.0, 50.0, 0, 1 );
            }



Re: adding a name into Attach3dtextlabeltovehicle - PowerPC603 - 19.11.2010

You forgot:
Код:
Attach3DTextLabelToVehicle( vehicle3Dtext, dodo, 0.0, 0.0, 0.0);



Re: adding a name into Attach3dtextlabeltovehicle - Haydz - 19.11.2010

Works, thanks so much.