Help with admin commands ?
#4

Quote:
Originally Posted by -Rebel Son-
Посмотреть сообщение
yay a nice person!, Well bud, You need a admn system, or a Account system. If you have a account system ad a variable called level or adminlevel or whatever, and Do somthing like thsis.

heres a admin command of mine you can kinda get an idea from

PHP код:
CMD:unmute(playeridparams[])
{
    new 
id;
    new 
victimname[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME];
    if(
GetPVarInt(playerid"Level") >= 1)
    {
    if (
sscanf(params"u"id)) return SendClientMessage(playeridCOLOR_REDSERVER_BOT "USAGE: /unmute [id]");
    if (
id == INVALID_PLAYER_ID) return SendClientMessage(playeridCOLOR_REDSERVER_BOT "This player is not connected");
    if(
GetPVarInt(playerid"Level") >= 2) return SendClientMessage(playeridCOLOR_REDSERVER_BOT "Cannot unmute this person!");
    
IsMuted[id] = 0;
    new 
stri[128];
    
GetPlayerName(idvictimnamesizeof(victimname));
    
GetPlayerName(playeridadminnamesizeof(adminname));
    
format(stri,128,SERVER_BOT "%s(%d) has unmuted %s(%d)",adminnameplayeridvictimnameid);
    
SendClientMessageToAll(COLOR_GREEN,stri);
    return 
1;
    }else return 
SendClientMessage(playerid,COLOR_RED,SERVER_BOT "You arent Authorised!");} 
No. that's hard for him to understand cuz he is newbie scripter and first of all he need to learn from https://sampwiki.blast.hk/wiki/IsPlayerAdmin

Not directly start making admin fs or gm.
Reply


Messages In This Thread
Help with admin commands ? - by Alex.Cone - 26.03.2011, 21:30
Re: Help with admin commands ? - by Davz*|*Criss - 26.03.2011, 21:32
Re: Help with admin commands ? - by -Rebel Son- - 26.03.2011, 21:32
Re: Help with admin commands ? - by Davz*|*Criss - 26.03.2011, 21:35
Re: Help with admin commands ? - by Alex.Cone - 26.03.2011, 21:38

Forum Jump:


Users browsing this thread: 1 Guest(s)