14.08.2018, 22:34
(
Последний раз редактировалось Kenton; 16.08.2018 в 08:19.
)
Hello guys. (english warning..)
I have one problem with a gamemode division. I'm start selecting one base gamemode on the include's ( #include "includes/asd.pwn" ), but im meet with problem in the commands. All enum's, define's, mysql, textdraw etc working, but a few commands doesn't.
The simple commands how a /help, /stats or /clearchat
(+)
work's, but the /setadmin not.. that
(-)
is ready, (main gamemode)
too, and here is the .pwn file
Okey i know, my english is killer, and i apologise for this, but maybe someone know help me please?
I have one problem with a gamemode division. I'm start selecting one base gamemode on the include's ( #include "includes/asd.pwn" ), but im meet with problem in the commands. All enum's, define's, mysql, textdraw etc working, but a few commands doesn't.
The simple commands how a /help, /stats or /clearchat
(+)
work's, but the /setadmin not.. that
(-)
Код:
#include <YSI\y_hooks>
Код:
#include "includes/commands/adminCommands/setadmin.pwn"
Код:
#include <YSI\y_hooks>
CMD:setadmin(playerid, params[])
{
new playerID, parameter, adminastring[128];
if(!IsPlayerAdmin(playerid)) return SendErrorMessage(playerid, "Nincs jogosultsбgod a parancs hasznбlatбhoz.");
if(PlayerInfo[playerid][pAdmin] < 4) return SendErrorMessage(playerid, "Nincs jogosultsбgod a parancs hasznбlatбhoz.");
else if(sscanf(params, "ui", playerID, parameter))
{
SendUsageMessage(playerid, "/setadmin [jбtйkos ID VAGY nйv] [szint]");
SendServerMessage(playerid, "1 = 1*Admin, 2 = 2*Admin, 3 = 3*Admin, 4 = 4*Admin");
return 1;
}
else if(parameter < 0 || parameter > 5) return SendErrorMessage(playerid, "Helytelen paramйterek.");
else if(!IsPlayerConnected(playerID)) return SendErrorMessage(playerid, "A megadott jбtйkos nem elйrhető.");
else
{
format(adminastring, sizeof(adminastring), "AdmCmd: (%s) megvбltoztatta (%s) admin szintjйt (%i)-re.", ReturnName(playerid), ReturnName(playerID), parameter);
SendClientMessageToAllEx(COLOR_RED, adminastring);
format(adminastring, sizeof(adminastring), "Admin szinted megvбltozott. Mostantуl a szinted (%i) (%s)-бttal.", parameter, ReturnName(playerid));
SendClientMessage(playerID, COLOR_GREEN, adminastring);
PlayerInfo[playerID][pAdmin] = parameter;
SaveCharacter(playerid);
}
return 1;
}


