02.07.2016, 12:38
[Plugin] Pawn.CMD
02.07.2016, 15:18
This is still not working with YSI y_hooks. Please fix.
02.07.2016, 15:21
02.07.2016, 18:18
02.07.2016, 18:32
03.07.2016, 06:44
can I change my gamemode which using y_commands to this?
EDIT:Is there any function like y_commands like Group_SetCommand or SetGlobalCommand?
EDIT:Is there any function like y_commands like Group_SetCommand or SetGlobalCommand?
03.07.2016, 06:50
03.07.2016, 07:04
PHP код:
FUNCTION:SetAdminCommand(cmdtext[], level)
{
new cmd = Command_GetID(cmdtext);
if(level > 0 && level < 7)
{
level--;
Group_SetGlobalCommand(cmd, false);
Group_SetCommand(g_Admin[level], cmd, true);
Group_SetCommand(g_Player, cmd, false);
}
else
printf("Error while processed %s on SetAdminCommand function", cmdtext);
return 1;
}
PHP код:
SetAdminCommand("vc", 1);
SetAdminCommand("spec", 1);
SetAdminCommand("specoff", 1);
//so on
PHP код:
COMMAND:spec(playerid, params[])
{
if(sscanf(params, "u", otherID))
{
Usage(playerid, "spec(tate) <playerid>");
}
else
{
if(isMe(playerid, otherID))
{ //so on
PHP код:
COMMAND:spec(playerid, params[])
{
if(Player[playerid][Level] >= 5)
{
if(sscanf(params, "u", otherID))
{
Usage(playerid, "spec(tate) <playerid>");
}
else
{
if(isMe(playerid, otherID))
{ //so on
03.07.2016, 07:42
Use flags.
03.07.2016, 12:01
How about using with sampgdk? It will be possible? (С++ and sampgdk)
03.07.2016, 12:06
05.07.2016, 08:22
Pawn.CMD was updated to version 3.1.1
- Fixed bug in native "PC_RenameCommand".
- Fixed bug in native "PC_RenameCommand".
05.07.2016, 14:38
Can you do a compararision/Benchmark against iCMD?
05.07.2016, 14:46
05.07.2016, 18:12
What exactly is wrong with this? It doesn't seem to detect the flags for my commands, and thus non-admins can use those commands.
Код:
enum(<<=1) { CMD_ADMIN, }; public OnPlayerCommandReceived(playerid, cmd[], params[], flags) { if((flags & CMD_ADMIN) && !IsPlayerAdmin(playerid)) { SendErrorMessage(playerid, "You do not have permission in order to use this command!"); return 0; } return 1; } cmd:unstuck(playerid, params[]) { new player; if(sscanf(params, "u", player)) return SendSyntaxMessage(playerid, "/unstuck [playerid]"); new Float:cX, Float:cY, Float:cZ; GetPlayerPos(player, cX, cY, cZ); SetPlayerPos(player, cX, cY, cZ+2.0); return 1; } flags:unstuck(CMD_ADMIN);
05.07.2016, 18:18
Quote:
What exactly is wrong with this? It doesn't seem to detect the flags for my commands, and thus non-admins can use those commands.
Код:
enum(<<=1) { CMD_ADMIN, }; public OnPlayerCommandReceived(playerid, cmd[], params[], flags) { if((flags & CMD_ADMIN) && !IsPlayerAdmin(playerid)) { SendErrorMessage(playerid, "You do not have permission in order to use this command!"); return 0; } return 1; } cmd:unstuck(playerid, params[]) { new player; if(sscanf(params, "u", player)) return SendSyntaxMessage(playerid, "/unstuck [playerid]"); new Float:cX, Float:cY, Float:cZ; GetPlayerPos(player, cX, cY, cZ); SetPlayerPos(player, cX, cY, cZ+2.0); return 1; } flags:unstuck(CMD_ADMIN); |
PHP код:
enum(<<=1)
{
CMD_ADMIN = 1,
};
05.07.2016, 18:26
06.07.2016, 16:41
There is indeed a bug with filterscripts.
When I use loadfs, OnPlayerCommandReceived/Performed callbacks and commands from that filterscript aren't called, only the ones from gamemode, even when I call commands from filterscript.
When I load the filterscript from server.cfg, no gamemode command is working, only commands from that filterscript.
I return 1 in both callbacks in both gamemode and filterscripts.
Also, this is what crashdetect prints when I load again that filterscript, after it was unloaded:
. Yes, the plugin was loaded correctly, I use 3.1.
I have
on top of the filterscript.
You should test this yourself and solve it.
When I use loadfs, OnPlayerCommandReceived/Performed callbacks and commands from that filterscript aren't called, only the ones from gamemode, even when I call commands from filterscript.
When I load the filterscript from server.cfg, no gamemode command is working, only commands from that filterscript.
I return 1 in both callbacks in both gamemode and filterscripts.
Also, this is what crashdetect prints when I load again that filterscript, after it was unloaded:
Quote:
[debug] Run time error 19: "File or function is not found" [debug] PC_Init |
I have
pawn Код:
#define FILTERSCRIPT
You should test this yourself and solve it.
06.07.2016, 17:34
Hmm... I will try to solve it.
07.07.2016, 05:37
(
Последний раз редактировалось BR3TT; 23.04.2017 в 12:22.
)
Quote:
There is indeed a bug with filterscripts.
When I use loadfs, OnPlayerCommandReceived/Performed callbacks and commands from that filterscript aren't called, only the ones from gamemode, even when I call commands from filterscript. When I load the filterscript from server.cfg, no gamemode command is working, only commands from that filterscript. I return 1 in both callbacks in both gamemode and filterscripts. Also, this is what crashdetect prints when I load again that filterscript, after it was unloaded: . Yes, the plugin was loaded correctly, I use 3.1. I have pawn Код:
You should test this yourself and solve it. |
Код:
[15:32:25] Loading filterscript 'Frosty-Admin-System.amx'... [15:32:25] Error: Function not registered: 'PC_Init' [15:32:25] Loaded 1 filterscripts.
Код:
#define FILTERSCRIPT //Includes #include <a_samp> #include <a_mysql> //Version R39.5 ( https://github.com/pBlueG/SA-MP-MySQL/re.../tag/R39-5 ) #include <Pawn.CMD> //Version 3.1.1 ( https://github.com/urShadow/Pawn.CMD/releases/tag/3.1.1 ) //Colours for chat #define COLOR_WHITE (0xFFFFFFFF) #define COLOR_RED (0xFF0000FF) #define COLOR_CYAN (0x33CCFFFF) #define COLOR_LIGHTRED (0xFF6347FF) #define COLOR_LIGHTGREEN (0x9ACD32FF) #define COLOR_YELLOW (0xFFFF00FF) #define COLOR_GREY (0xAFAFAFFF) #define COLOR_PURPLE (0xD0AEEBFF) #define COLOR_LIGHTYELLOW (0xF5DEB3FF) #define COLOR_DARKBLUE (0x1394BFFF) #define COLOR_ORANGE (0xFFA500FF) #define COLOR_LIME (0x00FF00FF) #define COLOR_GREEN (0x33CC33FF) #define COLOR_BLUE (0x2641FEFF) #define COLOR_LIGHTBLUE (0x007FFFFF) native WP_Hash(buffer[], len, const str[]); public OnFilterScriptInit() { print("[----------------------------------]"); print("[--------Frosty Admin System-------]"); print("[-----Created by: BR3TT-----]"); print("[----------Version: 1.0.0----------]"); print("[----------------------------------]"); return 1; } public OnFilterScriptExit() { return 1; } main() { return 1; }
« Next Oldest | Next Newest »
Users browsing this thread: 9 Guest(s)