How to change house pickups To house 3d text?
#1

Hello, i have an ingame house creater and when i make an house ingame a pickup will be spawned.
How can i change the pickup into GREEN 3d text?

Код:
    if(strcmp(Houses[i][hOwner], "Nobody", true) == 0)
			{
			    Houses[i][LockStatus] = 0;
            	Houses[i][HPickupID] = CreateDynamicPickup(1273, 23, Houses[i][hExteriorX], Houses[i][hExteriorY], Houses[i][hExteriorZ], 0, -1, -1, 150.0);
            }
            else
            {
                Houses[i][HPickupID] = CreateDynamicPickup(1272, 23, Houses[i][hExteriorX], Houses[i][hExteriorY], Houses[i][hExteriorZ], 0, -1, -1, 150.0);
            }

            printf("[system] House %d spawned.", i);
            SpawnedHouses++;
       }
    }
	return 1;
}
Reply
#2

https://sampwiki.blast.hk/wiki/3dtextlabel

It explains how to use 3dtextlabels.
Reply
#3

yee. but i actually need to know how to change the Createdynamicpickup into
create3dtextlabel or something you know that you see text instead of a pickup at a house.
Reply
#4

Just use Create3DTextLabel instead of Createdynamicpickup.
Reply
#5

Not like this isn't it? :
Код:
  if(strcmp(Houses[i][hOwner], "Nobody", true) == 0)
			{
			    Houses[i][LockStatus] = 0;
            	Houses[i][HPickupID] = Create3DTextLabel(1273, 23, Houses[i][hExteriorX], Houses[i][hExteriorY], Houses[i][hExteriorZ], 0, -1, -1, 150.0);
            }
            else
            {
                Houses[i][HPickupID] = Create3DTextLabel(1272, 23, Houses[i][hExteriorX], Houses[i][hExteriorY], Houses[i][hExteriorZ], 0, -1, -1, 150.0);
            }

            printf("[system] House %d spawned.", i);
            SpawnedHouses++;
       }
    }
	return 1;
}
Error/Warnings
Код:
C:\Users\Sjaak\Desktop\SjaakieYOL\YOL.pwn(2493) : error 035: argument type mismatch (argument 1)
C:\Users\Sjaak\Desktop\SjaakieYOL\YOL.pwn(2493) : warning 213: tag mismatch
C:\Users\Sjaak\Desktop\SjaakieYOL\YOL.pwn(2497) : error 035: argument type mismatch (argument 1)
C:\Users\Sjaak\Desktop\SjaakieYOL\YOL.pwn(2497) : warning 213: tag mismatch
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#6

pawn Код:
new Text[200];
format(Text,200,"House %d\nOwner %s\nPrice %d\nRent %d",HouseID,HouseInfo[HouseID][Owner],HouseInfo[HouseID][Price],HouseInfo[HouseID][Rent]);
Create3DTextLabel(Text,0xAFAFAFFF,Houses[i][hExteriorX], Houses[i][hExteriorY], Houses[i][hExteriorZ],10,0,1)
This is a little sample, learning by doing!
Reply
#7

Quote:
Originally Posted by Pablo Borsellino
Посмотреть сообщение
pawn Код:
new Text[200];
format(Text,200,"House %d\nOwner %s\nPrice %d\nRent %d",HouseID,HouseInfo[HouseID][Owner],HouseInfo[HouseID][Price],HouseInfo[HouseID][Rent]);
Create3DTextLabel(Text,0xAFAFAFFF,Houses[i][hExteriorX], Houses[i][hExteriorY], Houses[i][hExteriorZ],10,0,1)
This is a little sample, learning by doing!
Instead of the code that i send?
Reply
#8

Quote:
Originally Posted by Pablo Borsellino
Посмотреть сообщение
pawn Код:
new Text[200];
format(Text,200,"House %d\nOwner %s\nPrice %d\nRent %d",HouseID,HouseInfo[HouseID][Owner],HouseInfo[HouseID][Price],HouseInfo[HouseID][Rent]);
Create3DTextLabel(Text,0xAFAFAFFF,Houses[i][hExteriorX], Houses[i][hExteriorY], Houses[i][hExteriorZ],10,0,1)
This is a little sample, learning by doing!
Код:
  if(strcmp(Houses[i][hOwner], "Nobody", true) == 0)
			{
			    Houses[i][LockStatus] = 0;
				format(Sale,200,"House %d\nOwner %s\nPrice %d\nRent %d",HouseID,HouseInfo[HouseID][Owner],HouseInfo[HouseID][Price],HouseInfo[HouseID][Rent]);
				Create3DTextLabel(Text,0xAFAFAFFF,Houses[i][hExteriorX], Houses[i][hExteriorY], Houses[i][hExteriorZ],10,0,1)
            }
            else
            {
                                          format(Sale,200,"House %d\nOwner %s\nPrice %d\nRent %d",HouseID,HouseInfo[HouseID][Owner],HouseInfo[HouseID][Price],HouseInfo[HouseID][Rent]);
			   Create3DTextLabel(Text,0xAFAFAFFF,Houses[i][hExteriorX], Houses[i][hExteriorY], Houses[i][hExteriorZ],10,0,1)
            }

            printf("[system] House %d spawned.", i);
            SpawnedHouses++;
       }
    }
	return 1;
}
Код:
C:\Users\Sjaak\Desktop\Programma's\YOL.pwn(2496) : error 028: invalid subscript (not an array or too many subscripts): "HouseInfo"
C:\Users\Sjaak\Desktop\Programma's\YOL.pwn(2496) : warning 215: expression has no effect
C:\Users\Sjaak\Desktop\Programma's\YOL.pwn(2496) : error 001: expected token: ";", but found "]"
C:\Users\Sjaak\Desktop\Programma's\YOL.pwn(2496) : error 029: invalid expression, assumed zero
C:\Users\Sjaak\Desktop\Programma's\YOL.pwn(2496) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#9

[I]You are funny. You have to Change the Params (HouseID,HouseInfo[HouseID][Owner],HouseInfo[HouseID][Price],HouseInfo[HouseID][Rent]) to your Script Params like Houses[i][Owner] and so on.. Then use a Array for the 3D Textlabel and on the top of your Script new:HouseLabels[HOUSE_AMOUNT]; and create the 3DTextlabel with HouseLabel=Create3DText ... With this you can destroy it on OnGameModeExit or Update it if anyone bougt a House If you wait I can write you your hole Code but first tomorrow send me your House Enumerator via
Reply
#10

Quote:
Originally Posted by Pablo Borsellino
Посмотреть сообщение
[I]You are funny. You have to Change the Params (HouseID,HouseInfo[HouseID][Owner],HouseInfo[HouseID][Price],HouseInfo[HouseID][Rent]) to your Script Params like Houses[i][Owner] and so on.. Then use a Array for the 3D Textlabel and on the top of your Script new:HouseLabels[HOUSE_AMOUNT]; and create the 3DTextlabel with HouseLabel=Create3DText ... With this you can destroy it on OnGameModeExit or Update it if anyone bougt a House If you wait I can write you your hole Code but first tomorrow send me your House Enumerator via
I just added your msn..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)