Raised This Month: $ Target: $400
 0% 

Evaluate string as amxx code


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
PlayingTalking
Junior Member
Join Date: Apr 2007
Old 04-05-2009 , 09:26   Evaluate string as amxx code
Reply With Quote #1

Hi everybody. I've tried to get enwer in forum serch and google, but failed. May be i don't know what to look for.

Does anybody know a way to eval string as amxx code?

4 example:
Code:
amx_eval('client_print(0, print_chat, "Hello World");');
PlayingTalking is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-05-2009 , 11:01   Re: Evaluate string as amxx code
Reply With Quote #2

Why would you do that?

I'm just guessing but I would say not possible. The code would not be compiled.
__________________

Last edited by fysiks; 04-05-2009 at 11:14. Reason: got rid of double negative :)
fysiks is offline
PlayingTalking
Junior Member
Join Date: Apr 2007
Old 04-05-2009 , 11:33   Re: Evaluate string as amxx code
Reply With Quote #3

Quote:
Originally Posted by fysiks View Post
Why would you do that?
4 example:
i have 32 players and want to give them different sets of items and abilities. each set is not predefined and is genererated online depending on several triggers.
of course i can devide all of the sets into single operators and write procedures for each of them. but this is more complex. and each time i imagine new set i have to write new procedures and recompile plugin

i know that plugins must be compiled first and thus "amx_eval" is almost impossible.

but what if smb knows a module or libruary or smth else, that can help me
PlayingTalking is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-05-2009 , 11:54   Re: Evaluate string as amxx code
Reply With Quote #4

Do you know cvars exist ?
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
PlayingTalking
Junior Member
Join Date: Apr 2007
Old 04-05-2009 , 12:51   Re: Evaluate string as amxx code
Reply With Quote #5

Quote:
Originally Posted by ConnorMcLeod View Post
Do you know cvars exist ?
how can them help me?
PlayingTalking is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 04-05-2009 , 11:13   Re: Evaluate string as amxx code
Reply With Quote #6

Explain what exactly you are trying to do.
__________________
Bugsy is offline
MikeRussia
Member
Join Date: Nov 2007
Location: Moscow, capital of Russi
Old 04-05-2009 , 13:04   Re: Evaluate string as amxx code
Reply With Quote #7

PlayingTalking, lolbot.ru ??
__________________
gaben module is bullshit
MikeRussia is offline
Send a message via ICQ to MikeRussia Send a message via Skype™ to MikeRussia
PlayingTalking
Junior Member
Join Date: Apr 2007
Old 04-05-2009 , 13:10   Re: Evaluate string as amxx code
Reply With Quote #8

знаешь ответ на мой вопрос, дружище?
PlayingTalking is offline
DeepBlueSea
Junior Member
Join Date: Jul 2007
Old 04-05-2009 , 17:17   Re: Evaluate string as amxx code
Reply With Quote #9

Not possible because amxx plugins are compiled to virtual bytecode, which are executed at runtime. It is not an interpreted language.
DeepBlueSea is offline
PlayingTalking
Junior Member
Join Date: Apr 2007
Old 04-06-2009 , 02:26   Re: Evaluate string as amxx code
Reply With Quote #10

tnx. that's what i's warring about

thread may be closed
PlayingTalking is offline
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

Forum Jump


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


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