SA-MP Forums Archive
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)
+--- Thread: 3DText (/showthread.php?tid=381202)



3DText - SumX - 28.09.2012

Hello!
Some weeks ago I followed a tutorial to create some business,everything is fine but I tought to convert the GameText showed to you when you enter in a BusinessPickup to a 3DTextLabel.I've seen GarHouse but my mind is still ~??~.
Here is the "code" I have been fighting with.

Код:
public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
	new string[256];
	for(new b = 1;b < sizeof(BusinessInfo);b++)// Loopd through all the businesses again.
	{
		if(pickupid == BusinessInfo[b][bOutsideIcon])//Checks if it's a biz pickup.
		{
			if(BusinessInfo[b][bOwned] == 0)//Checks if it is owned.
			{
				format(string, sizeof(string), "~g~Name:~w~%s~n~~w~This business is ~g~for sale!~n~~r~Price:~g~%i~n~~g~BizID:~w~%i", BusinessInfo[b][bName], BusinessInfo[b][bPrice], b);//Formats a string with all the info.
				GameTextForPlayer(playerid, string, 3000, 3);
			}
			if(BusinessInfo[b][bOwned] == 1)//Checks if it is owned.
			{
				format(string, sizeof(string), "~g~Name:~w~%s~n~~g~Owner:~w~%s~n~~g~BizID:~w~%i", BusinessInfo[b][bName], BusinessInfo[b][bOwner], b);//Formats a string with all the info.
				GameTextForPlayer(playerid, string, 3000, 3);
			}
		}
	}
    return 1;
}
This is not a script request,this is just an ideea request.You explain me your reasoning and I script it.Thank you!


Re: 3DText - Mr.Anonymous - 28.09.2012

What exactly are you trying to say?


Re: 3DText - CROSS_Hunter - 28.09.2012

What is the Problem


Re: 3DText - zDevon - 28.09.2012

You will basically be copying the code you have there, but removing it from there and placing it OnGameModeInit. Then changing the game text lines to text labels using the same already-formatted string.


Re: 3DText - SumX - 28.09.2012

Solved!