Giter Club home page Giter Club logo

Comments (7)

MasRay29301 avatar MasRay29301 commented on June 19, 2024

How To Fix Sir ?

from samp-textdraw-streamer.

nexquery avatar nexquery commented on June 19, 2024

Use:

if(IsValidDynamicPlayerTextDraw(playerid, PlayerText:textid))
{
    DestroyDynamicPlayerTextDraw(playerid, textid);
}

from samp-textdraw-streamer.

MasRay29301 avatar MasRay29301 commented on June 19, 2024

Use:

if(IsValidDynamicPlayerTextDraw(playerid, PlayerText:textid))
{
    DestroyDynamicPlayerTextDraw(playerid, textid);
}

I used that code but it doesn't work for the script sir

from samp-textdraw-streamer.

MasRay29301 avatar MasRay29301 commented on June 19, 2024

The textdraw doesn't even disappear

from samp-textdraw-streamer.

nexquery avatar nexquery commented on June 19, 2024

Show your codes.

from samp-textdraw-streamer.

MatheusAgL avatar MatheusAgL commented on June 19, 2024

I have this problem too

from samp-textdraw-streamer.

nexquery avatar nexquery commented on June 19, 2024

This problem is caused by you or the person who made the script you are using. When you delete a textdraw, the plugin completely deletes the ID in the repository. When you try to delete it again, you get this error. Actually, the problem stems from the fact that you don't give -1 value to the textdraw variable after deleting the textdraw.

Incorrect Use:

Test_Textdraw[playerid] = CreatePlayerTextDraw(playerid, 0.0, 0.0, "Test");

PlayerTextDrawDestroy(playerid, Test_Textdraw[playerid]); // OK
PlayerTextDrawDestroy(playerid, Test_Textdraw[playerid]); // Error

// Or
for(new i = 0; i < 2; i++)
{
	// i == 0  :: OK
	// i == 1  :: Error
	PlayerTextDrawDestroy(playerid, Test_Textdraw[playerid]);
}

Correct Usage:

new PlayerText:Test_Textdraw[MAX_PLAYERS];

Test_Textdraw[playerid] = CreatePlayerTextDraw(playerid, 0.0, 0.0, "Test");

if(Test_Textdraw[playerid] != PlayerText:-1)
{
	PlayerTextDrawDestroy(playerid, Test_Textdraw[playerid]);
	Test_Textdraw[playerid] = PlayerText:-1;
}

// Or
for(new i = 0; i < 2; i++)
{
	if(Test_Textdraw[playerid] != PlayerText:-1)
	{
		PlayerTextDrawDestroy(playerid, Test_Textdraw[playerid]);
		Test_Textdraw[playerid] = PlayerText:-1;
	}
}

// Or
if(IsValidDynamicPlayerTextDraw(playerid, Test_Textdraw[playerid]))
{
    PlayerTextDrawDestroy(playerid, Test_Textdraw[playerid]);
}

from samp-textdraw-streamer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.