Gamemode in the includes
#1

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
(-)
Код:
#include <YSI\y_hooks>
is ready, (main gamemode)
Код:
#include "includes/commands/adminCommands/setadmin.pwn"
too, and here is the .pwn file
Код:
#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; 
}
Okey i know, my english is killer, and i apologise for this, but maybe someone know help me please?
Reply


Messages In This Thread
Gamemode in the includes - by Kenton - 14.08.2018, 22:34
Re: Gamemode in the includes - by AlexMSK - 14.08.2018, 22:58
Re: Gamemode in the includes - by Kenton - 14.08.2018, 23:08
Re: Gamemode in the includes - by AlexMSK - 14.08.2018, 23:12
Re: Gamemode in the includes - by Kenton - 14.08.2018, 23:40
Re: Gamemode in the includes - by Sew_Sumi - 15.08.2018, 01:10
Re: Gamemode in the includes - by AlexMSK - 15.08.2018, 07:53
Re: Gamemode in the includes - by Sew_Sumi - 15.08.2018, 20:07
Re: Gamemode in the includes - by Kenton - 16.08.2018, 07:59
Re: Gamemode in the includes - by Kenton - 17.08.2018, 14:18
Re: Gamemode in the includes - by Sew_Sumi - 19.08.2018, 08:07

Forum Jump:


Users browsing this thread: 1 Guest(s)