AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Pawn code from console (https://forums.alliedmods.net/showthread.php?t=22095)

Obbin 12-18-2005 15:41

Pawn code from console
 
is it possibe to make a function where the pawn code itself is defined by the user in console?

ex:

amx_pawncode "set_user_godmode(id)" <-- Sets godmode on the user that called the command
amx_pawncode "set_user_godmode(9)" <-- Sets godmode on the user width userid #9

I've missed this many times, because im to lazy to install a ton of plugins to be able to use every single function in the amxx library

karlos 12-18-2005 16:03

yes it is possible but hell lot of work
i have a similar plugin "engine chat"

currently it only has amxmodx.inc + engine.inc functions
when i have time i will add fun + fakemeta

it is used in chat and syntax is without brackets and no comma
read info inside sma

Obbin 12-19-2005 05:17

Quote:

Originally Posted by karlos
yes it is possible but hell lot of work
i have a similar plugin "engine chat"

currently it only has amxmodx.inc + engine.inc functions
when i have time i will add fun + fakemeta

it is used in chat and syntax is without brackets and no comma
read info inside sma

Icant find it :S
Link?

karlos 12-19-2005 06:02

here

Charr 12-19-2005 15:10

It wouldn't be hard, just lengthy.
Would need s**t load of if's

MaximusBrood 12-19-2005 16:18

Quote:

Originally Posted by Charr
It wouldn't be hard, just lengthy.
Would need s**t load of if's

Alias already done :)

Twilight Suzuka 12-19-2005 16:20

Ew. That plugin is ugly. REALLY ugly.
A better way would be to write a module to compile strings on the fly! I might do that someday...

XxAvalanchexX 12-19-2005 16:47

You're thinking of the "eval" function. Pawn does not have one of these.

Obbin 12-22-2005 07:10

Quote:

Originally Posted by Twilight Suzuka
Ew. That plugin is ugly. REALLY ugly.
A better way would be to write a module to compile strings on the fly! I might do that someday...

If u do that it would be awsome 8)


All times are GMT -4. The time now is 15:53.

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