-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[textdraw.streamer] DestroyDynamicPlayerTextDraw: No such id was found. (playerid: 0, textId: 0) (server-package\ui-fivem.pwn:177) #35
Comments
How To Fix Sir ? |
Use: if(IsValidDynamicPlayerTextDraw(playerid, PlayerText:textid))
{
DestroyDynamicPlayerTextDraw(playerid, textid);
} |
I used that code but it doesn't work for the script sir |
The textdraw doesn't even disappear |
Show your codes. |
I have this problem too |
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]);
} |
No description provided.
The text was updated successfully, but these errors were encountered: