SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 08/04/2020, 07:28 PM   #1
einstamas
Little Clucker
 
Join Date: Oct 2017
Posts: 7
Reputation: 0
Question How to check if a 3DTEXT exists?

Code:
if(Text3D:haz3dtxt[id] != Text3D:INVALID_3DTEXT_ID) Delete3DTextLabel(haz3dtxt[id]);
This is my line, but it looks like it's not really working. Invalid 3dtext labels are getting deleted, and it's causing a global bug.

I need a solution to detect if the 3dtext exists or not.
einstamas is offline   Reply With Quote
Old 08/04/2020, 07:30 PM   #2
Symon
Gangsta
 
Symon's Avatar
 
Join Date: Apr 2019
Location: Italy
Posts: 924
Reputation: 89
Default Re: How to check if a 3DTEXT exists?

pawn Code:
IsValidDynamic3DTextLabel

Maybe?
Symon is offline   Reply With Quote
Old 08/04/2020, 07:36 PM   #3
NoteND
Huge Clucker
 
Join Date: May 2016
Posts: 252
Reputation: 5
Default Re: How to check if a 3DTEXT exists?

Quote:
Originally Posted by Symon View Post
pawn Code:
IsValidDynamic3DTextLabel

Maybe?
He isnt using streamer, I guess.
NoteND is offline   Reply With Quote
Old 08/04/2020, 07:46 PM   #4
v1k1nG
Huge Clucker
 
v1k1nG's Avatar
 
Join Date: Feb 2018
Posts: 497
Reputation: 35
Default Re: How to check if a 3DTEXT exists?

I'd suggest you to use incognito's streamer, here is the wiki:
https://github.com/samp-incognito/sa...er-plugin/wiki

download at:
https://github.com/samp-incognito/sa...lugin/releases
__________________
My test server: 51.91.122.18:7778
My Discord contact: [SF]kAn3#9933
YT https://www.youtube.com/channel/UCrM...QtP2pczguqvppw
v1k1nG is offline   Reply With Quote
Old 08/04/2020, 07:52 PM   #5
einstamas
Little Clucker
 
Join Date: Oct 2017
Posts: 7
Reputation: 0
Default Re: How to check if a 3DTEXT exists?

I solved it by creating an integer for all houses and setting it to 1 at creating, then setting it to 0 at destroying.
The if statement is now asking for the new int and not the 3dtext.
That was the easiest solution. Thanks anyway!
einstamas is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
y_ini - check if entry exists Brooks1 Scripting Help 6 07/07/2016 01:12 PM
Check if a file exists Machida Scripting Help 3 15/01/2012 07:44 PM
how to check if exists? ajwar Help Archive 3 14/07/2011 04:38 PM
How to check if file exists? Micheal_ Help Archive 2 10/07/2011 03:50 AM
[MYSQL] Check if username exists? coole210 Help Archive 18 03/06/2010 04:23 PM


All times are GMT. The time now is 05:55 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.