String help..
#1

Im trying to turn this: vehicle3Dtext = Create3DTextLabel("Example Text", 0xFF0000AA, 0.0, 0.0, 0.0, 50.0, 0, 1 ); into a string and im having trouble plz help
pawn Код:
new vehicle_id, Text3D:vehicle3Dtext;
                    new OwnerName[MAX_PLAYER_NAME];
                    new str[128];
            GetPlayerName(playerid,OwnerName,sizeof(OwnerName));
                    vehicle3Dtext = format(str,128,"%s",  OwnerName);//Line 376
                    Create3DTextLabel(WHITE,0.0, 0.0, 0.0, 50.0, 0, 1,str);//Line 377
                    vehicle_id = VehList[playerid][AutoID];
                    Attach3DTextLabelToVehicle(vehicle3Dtext, vehicle_id, 0.0, 0.0, 2.0);
heres the error:

Код:
C:\Users\Geez\Desktop\PawnWork\filterscripts\CuntOfAScript.pwn(376) : warning 213: tag mismatch
C:\Users\Geez\Desktop\PawnWork\filterscripts\CuntOfAScript.pwn(377) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#2

The parameters for the Create3DTextLabel are mixed up, see the correct parameters here:

https://sampwiki.blast.hk/wiki/Create3DTextLabel

Additionally you're assigning the return value of format to the vehicle3Dtext variable, which makes no sense, you should be assigning it to the return value of Create3DTextLabel like so:

pawn Код:
vehicle3Dtext = Create3DTextLabel(......your stuff);
Reply
#3

Yes but i want a string in the label (There name) and im trying to do it like u do with SendClientMessage but its not working can u show me how to use a string in it with there name?

EDIT: fixed just mixed a few things up thankyou
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)