Dynamic3DTextLabels
#1

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)
Reply
#2

*create a Filter Script.
*Add the script (3DText's) there.
*Then put DestroyAllDynamic3DTextLabels();
Reply
#3

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?
Reply
#4

You don't declare global variables in main, you need to declare them outside of all functions and callbacks.
Reply
#5

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?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)