Dynamic3DTextLabels - 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: Dynamic3DTextLabels (
/showthread.php?tid=439036)
Dynamic3DTextLabels -
UnknownGamer - 23.05.2013
Hi,
Is their any-way to separate labels from the gamemode, to filterscripts?
So when I use OnFilterScriptExit, it doesn't clear all my labels in-game, from the gamemode?
I'm using DestroyAllDynamic3DTextLabels(); (But this is also clearing all my gamemode ones too)
Re: Dynamic3DTextLabels -
Avi Raj - 23.05.2013
*create a Filter Script.
*Add the script (3DText's) there.
*Then put DestroyAllDynamic3DTextLabels();
Re: Dynamic3DTextLabels -
UnknownGamer - 23.05.2013
This is the error I'm having;
pawn Код:
main()
{
new rand = 1000 + random(25000);
}
CMD:setgang(playerid, params[])
{
new string[256], name[60], leader;
new Float:x, Float:y, Float:z;
if(sscanf(params, "us[60]", leader, name[59])) return SCM(playerid, COLOR_LIGHTRED, "USAGE: /setgang [Gang Leader (playername/id)] [Gang Name]");
if(!IsPlayerConnected(leader)) return SCM(playerid, COLOR_LIGHTRED, "[SERVER]: Invalid PlayerID!");
GetPlayerPos(playerid, x, y, z);
CreateDynamicPickup(1239, 1, x, y, z);
format(string, sizeof(string), "[Official Gang Information] \n [Gang ID: %d] \n [Gang Name: %s] \n [Gang Leader: %s]", rand, name[59], GetPlayerNameEx(leader));
CreateDynamic3DTextLabel(string, COLOR_LIGHTBLUE, x, y, z, 15);
return 1;
}
When I /setgang, Gang ID is showing as 0... But if then I move that into the command, it generates a random number, what am I doing wrong?
Re: Dynamic3DTextLabels -
SuperViper - 23.05.2013
You don't declare global variables in
main, you need to declare them outside of all functions and callbacks.
Re: Dynamic3DTextLabels -
UnknownGamer - 23.05.2013
Quote:
Originally Posted by SuperViper
You don't declare global variables in main, you need to declare them outside of all functions and callbacks.
|
Where abouts would I declare it?