SA-MP Forums Archive
[FilterScript] Execute PAWN Functions In-Game - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Execute PAWN Functions In-Game (/showthread.php?tid=252372)

Pages: 1 2 3


Execute PAWN Functions In-Game - RyDeR` - 01.05.2011

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



Re: Execute PAWN Functions In-Game - Pooh7 - 01.05.2011

Nice.

Can you make it for Linux?


Re: Execute PAWN Functions In-Game - Markx - 01.05.2011

Nice! Amazing work dude!


Re: Execute PAWN Functions In-Game - Medal Of Honor team - 01.05.2011

awesome release!


Re: Execute PAWN Functions In-Game - rbN. - 01.05.2011

Nice


Re: Execute PAWN Functions In-Game - Kwarde - 01.05.2011

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.


Re: Execute PAWN Functions In-Game - Phanto90 - 01.05.2011

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


Re: Execute PAWN Functions In-Game - RyDeR` - 01.05.2011

@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...


Re: Execute PAWN Functions In-Game - hackzor4 - 01.05.2011

OMFG That's awesome dude !


Re: Execute PAWN Functions In-Game - BASITJALIL - 01.05.2011

Very fucking nice


Re: Execute PAWN Functions In-Game - Zh3r0 - 01.05.2011

RyDeR you always impress me with your scripts!


Re: Execute PAWN Functions In-Game - SchurmanCQC - 01.05.2011

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.


Re: Execute PAWN Functions In-Game - Kwarde - 01.05.2011

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")


Re: Execute PAWN Functions In-Game - SchurmanCQC - 01.05.2011

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.


Re: Execute PAWN Functions In-Game - pischel - 01.05.2011

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


Re: Execute PAWN Functions In-Game - hackzor4 - 01.05.2011

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


Re: Execute PAWN Functions In-Game - Hal - 01.05.2011

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?


Re: Execute PAWN Functions In-Game - RyDeR` - 01.05.2011

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.


Re: Execute PAWN Functions In-Game - willsuckformoney - 01.05.2011

Best work. Awesome.

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


Re: Execute PAWN Functions In-Game - Steve* - 01.05.2011

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'.