Makeadmin command troubles
#5

pawn Код:
dcmd_makeadmin(playerid, params[])
{
  new str[128], AdminLvl[128];
  if(IsPlayerConnected(playerid))
  {
    if(PlayerInfo[playerid][pAdmin] == 0) return SystemMsg (playerid, "You must be a admin to use this command!");
    new giveplayerid = ReturnUser(params);
    if(sscanf(params, "us", giveplayerid, AdminLvl)) return SystemMsg(playerid, " Usage : /makeadmin [playerid / name] [admin level]");
    if(!IsPlayerConnected(giveplayerid)) return SystemMsg(playerid, "That player is not connected!");
    else
    {
        format(str, sizeof(str), "ADMIN %s has made %s level %d admin", PlayerName(playerid), PlayerName(giveplayerid), AdminLvl);
        SendClientMessageToAll(COLOR_YELLOW, str);
        PlayerInfo[giveplayerid][pAdmin]; = AdminLvl;
        }
    }
    return 1;
}
Reply


Messages In This Thread
Makeadmin command troubles - by Ov3rl0rd - 13.09.2009, 07:08
Re: ID 0 not working - by dice7 - 13.09.2009, 07:26
Re: ID 0 not working - by Ov3rl0rd - 13.09.2009, 07:39
Re: Makeadmin command troubles - by dice7 - 13.09.2009, 07:42
Re: ID 0 not working - by Karlip - 13.09.2009, 07:43
Re: Makeadmin command troubles - by Ov3rl0rd - 13.09.2009, 07:50
Re: Makeadmin command troubles - by dice7 - 13.09.2009, 08:00
Re: Makeadmin command troubles - by Ov3rl0rd - 13.09.2009, 08:08
Re: Makeadmin command troubles - by dice7 - 13.09.2009, 08:14
Re: Makeadmin command troubles - by Ov3rl0rd - 13.09.2009, 08:16

Forum Jump:


Users browsing this thread: 1 Guest(s)