[FilterScript] Execute PAWN Functions In-Game
#1

Execute PAWN Functions In-Game

Hi all, I saw this yesterday, and I found it a brilliant idea. So I though let me release it for people that want to use this also.
I was actually going to use my pawnCompiler plugin to make this but I made another plugin just to execute pawncc.exe better. There's one command called "/exec" with one parameter where you write the function (/exec [function]).

Video (video by Matthias_)

[ame]http://www.youtube.com/watch?v=0quboIjj2G4[/ame]

Download

Click here here to download complete script
Click here to download WinExec_Source

Notes (READ FIRST)

- Complete 'pawno' folder has to be in the root of your server files (the path where samp-server.exe is located).
- If WinExec is unable to execute pawncc please check which ERROR CODE it gives you (see definitions).
- If your code contains errors samp-server.exe will print the errors.

Credits go to Matthias_ for the idea and his video.

If it always executes the previous command (for slow computers)

This is due the slowness of your computer. The script compiles slower than it executes thus the previous .amx will execute and some miliseconds later the new .amx will be generated. You can simply solve this by increasing the timer interval:
Code:
SetTimer("ReloadFS", 50, 0); // Increase 50 to 70, if still same try 100
Reply
#2

Nice.

Can you make it for Linux?
Reply
#3

Nice! Amazing work dude!
Reply
#4

awesome release!
Reply
#5

Nice
Reply
#6

Fuckin thanx.
This is what I needed for a long time

Tested with
Code:
/exec new Float:pos[3]; GetPlayerPos(0, pos[0], pos[1], pos[2]); SetPlayerPos(0, pos[0], pos[1], pos[2]+50);
Nice working.
Reply
#7

Could also handle more function at the same time?
Example:
Code:
/exec SetPlayerMoney(0,GetPlayerMoney(0)+100)
Source?
Reply
#8

@Pooh7:
I'm sorry, I only do have clue about Windows.

@Phanto90:
Yes, as long as the code is not longer then 128 characters long. A better way is to use dialogs, then your code can be longer, so feel free to edit.

Plugin source is comming...
Reply
#9

OMFG That's awesome dude !
Reply
#10

Very fucking nice
Reply
#11

RyDeR you always impress me with your scripts!
Reply
#12

This is AMAZING. Brilliant work. This will be great for working with functions in game when you have no commands to do call them!

EDIT: Just looked at the script, but it looks amazingly simple with the use of WinExec.
Reply
#13

Quote:
Originally Posted by Schurman
Посмотреть сообщение
EDIT: Just looked at the script, but it looks amazingly simple with the use of WinExec.
It is With the plugin it is easy. But does that matter? (No need to answer that, because the answer is "No, it doesn't")
Reply
#14

I didn't say it mattered.

Also, you cannot call functions that have the parameter 'playerid' in them since it executes the inputted functions in onfilterscriptinit. And as we all know, Onfilterscriptinit doesn't return a playerid.
Reply
#15

I want to do this for a long time, but I have no patience. Good work man, really thx to you.
Reply
#16

Quote:
Originally Posted by Zh3r0
Посмотреть сообщение
RyDeR you always impress me with your scripts!
Seems so
Reply
#17

Quote:
Originally Posted by Pooh7
View Post
Nice.

Can you make it for Linux?
I do not think it would be as easy as recompiling it. It would have to be recoded for the linux compiler?
Reply
#18

Quote:
Originally Posted by Hal
View Post
I do not think it would be as easy as recompiling it. It would have to be recoded for the linux compiler?
Indeed, you will need something different to execute pawncc with.

If anyone is able to do it, go ahead.
Reply
#19

Best work. Awesome.

Speeds up scripting, instead of making the command with that function, just type /exec FUNCTION(...) then your command is complete.
Reply
#20

LoL, my server shuts down when i do something with it...

pawn Код:
[08:18:16] [join] [TFD]Steve has joined the server (0:127.0.0.1)
[08:18:37] RCON (In-Game): Player #0 ([TFD]Steve) has logged in.
[08:18:40]   Filter script '../scriptfiles/ExecFS.amx' unload failed.
[08:18:40] Failed to load 'filterscripts/../scriptfiles/ExecFS.amx.amx' filter script.
[08:18:40]   Filter script '../scriptfiles/ExecFS.amx' load failed'.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)