AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Evaluate string as amxx code (https://forums.alliedmods.net/showthread.php?t=89355)

PlayingTalking 04-05-2009 09:26

Evaluate string as amxx code
 
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");');

fysiks 04-05-2009 11:01

Re: Evaluate string as amxx code
 
Why would you do that?

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

Bugsy 04-05-2009 11:13

Re: Evaluate string as amxx code
 
Explain what exactly you are trying to do.

PlayingTalking 04-05-2009 11:33

Re: Evaluate string as amxx code
 
Quote:

Originally Posted by fysiks (Post 798012)
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

ConnorMcLeod 04-05-2009 11:54

Re: Evaluate string as amxx code
 
Do you know cvars exist ? :mrgreen:

PlayingTalking 04-05-2009 12:51

Re: Evaluate string as amxx code
 
Quote:

Originally Posted by ConnorMcLeod (Post 798050)
Do you know cvars exist ? :mrgreen:

how can them help me?

MikeRussia 04-05-2009 13:04

Re: Evaluate string as amxx code
 
PlayingTalking, lolbot.ru ??

PlayingTalking 04-05-2009 13:10

Re: Evaluate string as amxx code
 
знаешь ответ на мой вопрос, дружище?

DeepBlueSea 04-05-2009 17:17

Re: Evaluate string as amxx code
 
Not possible because amxx plugins are compiled to virtual bytecode, which are executed at runtime. It is not an interpreted language.

PlayingTalking 04-06-2009 02:26

Re: Evaluate string as amxx code
 
tnx. that's what i's warring about :(

thread may be closed


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

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