21.11.2012, 13:07
(
Последний раз редактировалось BJIADOKC; 21.11.2012 в 16:02.
)
Hi everybody.
I decided to wrote a new plugin, it's just a command processor for SA-MP server, but Threaded.
It works like zcmd, plugin calls callbacks with params, but now, there is additional arg, where params len stored.
It is not faster than zcmd or YCMD (because working with ProcessTick), but it free's some time in PAWN thread.
Usage:
It's simple, just add include and plugin to your server and make new commands!
Links
https://www.dropbox.com/s/jngfg6g88vnohsz/bin.zip - .dll + .so + .inc
https://www.dropbox.com/s/cn1oawqdj2v25nb/src.zip - Source code
I decided to wrote a new plugin, it's just a command processor for SA-MP server, but Threaded.
It works like zcmd, plugin calls callbacks with params, but now, there is additional arg, where params len stored.
It is not faster than zcmd or YCMD (because working with ProcessTick), but it free's some time in PAWN thread.
Usage:
It's simple, just add include and plugin to your server and make new commands!
PHP код:
TCMD:test(playerid, params[], params_len)
{
if(!params_len) // We haven't got params
{
SendClientMessage(playerid, -1, "Test without params!");
}
else
{
new string[128]; // 128 because PAWN don't support dynamic arrays, :(
format(string, sizeof string, "Yahoo! Test with params %s, length is %d", params, params_len);
SendClientMessage(playerid, -1, string);
}
return 1;
}
https://www.dropbox.com/s/jngfg6g88vnohsz/bin.zip - .dll + .so + .inc
https://www.dropbox.com/s/cn1oawqdj2v25nb/src.zip - Source code