SA-MP Forums Archive
How to change house pickups To house 3d text? - 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: How to change house pickups To house 3d text? (/showthread.php?tid=243138)



How to change house pickups To house 3d text? - Derksen123 - 21.03.2011

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;
}



Re: How to change house pickups To house 3d text? - Stigg - 21.03.2011

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

It explains how to use 3dtextlabels.


Re: How to change house pickups To house 3d text? - Derksen123 - 21.03.2011

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.


Re: How to change house pickups To house 3d text? - Stigg - 21.03.2011

Just use Create3DTextLabel instead of Createdynamicpickup.


Re: How to change house pickups To house 3d text? - Derksen123 - 21.03.2011

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.



AW: How to change house pickups To house 3d text? - Pablo Borsellino - 21.03.2011

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!


Re: AW: How to change house pickups To house 3d text? - Derksen123 - 21.03.2011

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?


Re: AW: How to change house pickups To house 3d text? - Derksen123 - 21.03.2011

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.



AW: How to change house pickups To house 3d text? - Pablo Borsellino - 21.03.2011

[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


Re: AW: How to change house pickups To house 3d text? - Derksen123 - 22.03.2011

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..