Raised This Month: $ Target: $400
 0% 

[Solved] Button IDs are Changing


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Stylaa
Senior Member
Join Date: Oct 2009
Location: Flensburg, Germany
Old 10-20-2010 , 13:55   [Solved] Button IDs are Changing
Reply With Quote #1

I coded a Plugin that opens the Jails in Jailbreak
but after 1 Day / RR The Button IDs are changed
lower or higher why are the Button IDs Changing?

How i can solve this Problem?
__________________

Some People brings Happynes by Coming
Some by Going

Last edited by Stylaa; 10-20-2010 at 20:20. Reason: Changed Title
Stylaa is offline
Send a message via ICQ to Stylaa
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-20-2010 , 14:35   Re: Button IDs are Changing
Reply With Quote #2

Because you may have added some plugins that create some entities at plugin_precache.
You should save buttons by model or target or something that won't change.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Stylaa
Senior Member
Join Date: Oct 2009
Location: Flensburg, Germany
Old 10-20-2010 , 15:04   Re: Button IDs are Changing
Reply With Quote #3

and how i get those values?
__________________

Some People brings Happynes by Coming
Some by Going
Stylaa is offline
Send a message via ICQ to Stylaa
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 10-20-2010 , 15:14   Re: Button IDs are Changing
Reply With Quote #4

Code:
new szModel[ 32 ]; entity_get_string( iEntity, EV_SZ_model, szModel, charsmax( szModel ) ); new szTarget[ 32 ]; entity_get_string( iEntity, EV_SZ_target, szTarget, charsmax( szTarget ) );

For fakemeta, use pev() instead of entity_get_string() and change EV_SZ_* to pev_*.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Stylaa
Senior Member
Join Date: Oct 2009
Location: Flensburg, Germany
Old 10-20-2010 , 15:59   Re: Button IDs are Changing
Reply With Quote #5

so as Model it shows me

*27

How i can convert it back in Ent ingam and Press The Button manualy
PHP Code:
new buttonid
buttonid 
= ???
dllfuncDLLFunc_Usebuttonidid 
__________________

Some People brings Happynes by Coming
Some by Going

Last edited by Stylaa; 10-20-2010 at 16:03.
Stylaa is offline
Send a message via ICQ to Stylaa
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 10-20-2010 , 16:07   Re: Button IDs are Changing
Reply With Quote #6

find_ent_by_model()
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Stylaa
Senior Member
Join Date: Oct 2009
Location: Flensburg, Germany
Old 10-20-2010 , 16:11   Re: Button IDs are Changing
Reply With Quote #7

PHP Code:
new buttonid
buttonid 
find_ent_by_model(33,"weaponbox","models/w_scout.mdl")
dllfuncDLLFunc_Usebuttonidid 


Where to put the *27 ??

buttonid = find_ent_by_model(*27,"weaponbox","models/w_scout.mdl")

? Sorry i dont know this Funcktion so can you please explain me how i use it now?
__________________

Some People brings Happynes by Coming
Some by Going
Stylaa is offline
Send a message via ICQ to Stylaa
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 10-20-2010 , 16:17   Re: Button IDs are Changing
Reply With Quote #8

http://www.amxmodx.org/funcwiki.php?...odel&go=search

To find an entity classname, it is a string from EV_SZ_classname (or pev_classname).
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Stylaa
Senior Member
Join Date: Oct 2009
Location: Flensburg, Germany
Old 10-20-2010 , 16:47   Re: Button IDs are Changing
Reply With Quote #9

okay
But how i use now the Variable

( mysql_openbuttonid returns *62 )
PHP Code:
// if there are results found - ButtonID
    
mysql_openbuttonid SQL_ReadResult(Query1)
    
    new 
tmp find_ent_by_model ( -1"func_button""%s",  mysql_openbuttonid
    
mysql_openbuttonid tmp 
__________________

Some People brings Happynes by Coming
Some by Going
Stylaa is offline
Send a message via ICQ to Stylaa
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 10-20-2010 , 17:25   Re: Button IDs are Changing
Reply With Quote #10

You have to read as a string.

Code:
new mysql_openbuttonid[10] SQL_ReadResult(Query, 1, mysql_openbuttonid, charsmax(mysql_openbuttonid))
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Reply



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

Forum Jump


All times are GMT -4. The time now is 10:21.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode