Gamemode in the includes
#7

This will work

PHP код:
CMD:setadmin(playeridparams[])
{
    new 
playerIDparameteradminastring[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.");
    if(
sscanf(params"ui"playerIDparameter))
    {
        
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;
    }
    if(
parameter || parameter 5) return SendErrorMessage(playerid"Helytelen paramйterek.");
    if(!
IsPlayerConnected(playerID)) return SendErrorMessage(playerid"A megadott jбtйkos nem elйrhető.");
    
format(adminastringsizeof(adminastring), "AdmCmd: (%s) megvбltoztatta (%s) admin szintjйt (%i)-re."ReturnName(playerid), ReturnName(playerID), parameter);
    
SendClientMessageToAllEx(COLOR_REDadminastring);
    
format(adminastringsizeof(adminastring), "Admin szinted megvбltozott. Mostantуl a szinted (%i) (%s)-бttal."parameterReturnName(playerid));
    
SendClientMessage(playerIDCOLOR_GREENadminastring);
    
PlayerInfo[playerID][pAdmin] = parameter;
    
SaveCharacter(playerid);
    return 
1

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)