IRCCMD:setlevel Help
#1

Hello , Today i got a problem , i included my irc system inside my admin system , then i tried to create !setlevel command from irc.
i tried as i can but i can't make i just made
!settrialmod
!setmod
!setadmin
!setadvisor
!setmanagment

--------------------------------
Max Admin Level : 6
pInfo[player1][pLevel] >= 1; Trial Moderator
pInfo[player1][pLevel] >= 2; Moderator
pInfo[player1][pLevel] >= 3; Admintstrator
pInfo[player1][pLevel] >= 4; Advisor
pInfo[player1][pLevel] >= 5; Managment
pInfo[player1][pLevel] >= 6; Owner

-------------
if(pInfo[player1][Logged] == 1) -- if logged in
-----------------------------------
For EXAMPLE:
Код:
IRCCMD:settrialmod(botid, channel[], user[], host[], params[]) {
    if (IRC_IsAdmin(botid, channel, user))
       {
    new playerid[MAX_PLAYER_NAME];
    new player1, string[128], dsname[MAX_PLAYER_NAME];
    if(sscanf(params,"i",player1)) return IRC_GroupSay(groupID,IRC_CHANNEL, "12USAGE: !settrialmod [playerid]");
    if(pInfo[player1][Logged] == 1)
    pInfo[player1][pLevel] >= 1;
	GetPlayerName(player1, dsname, sizeof(dsname));
	format(string, sizeof(string), "12-StuntX- You have given Trial Moderator Level to %s ",dsname);
    IRC_GroupSay(groupID,IRC_CHANNEL,string);
    GetPlayerName(player1, dsname, sizeof(dsname));
	format(string, sizeof(string), "-StuntX- Player %s got promoted to a Trial Moderator By Admin on (IRC)",dsname);
    SendClientMessageToAll(0xD2691EAA, string);
    }
    return 1;
}
So if any one can make to me setlevel command to irc
Reply
#2

pInfo[player1][pLevel] >= 1;

Why not pInfo[player1][pLevel] = 1;
Reply
#3

Quote:
Originally Posted by Jamester
Посмотреть сообщение
pInfo[player1][pLevel] >= 1;

Why not pInfo[player1][pLevel] = 1;
it can be pInfo[playerid][pLevel] =1; too, anyway if you can create the command
use any one you want .
Reply
#4

This isn't script for you, and your indentation is terrible.
Reply
#5

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
This isn't script for you, and your indentation is terrible.
Can you explain?
Anyway your words seems bad , so this section is for scripting help if you can help i am welcoming with your reply , if you can't , you dont have to reply , i am wrong?
Reply
#6

I am free so why not doing it for ya xd

here you go: [ if that's what you meant... ]

PHP код:
IRCCMD:setlevel(botidchannel[], user[], host[], params[]) {
    if (
IRC_IsAdmin(botidchanneluser))
    {
        new 
playerid[MAX_PLAYER_NAME];
        new 
player1LefeLstring[128], dsname[MAX_PLAYER_NAME];
        if(
sscanf(params,"ii",player1,LefeL)) return IRC_GroupSay(groupID,IRC_CHANNEL"12USAGE: !settrialmod [playerid] [level]");
        if(
pInfo[player1][Logged] == 1)
        {
            if(
LefeL || LefeL /* change 8 with yar max level*/)
            {
                
IRC_GroupSay(groupID,IRC_CHANNEL"12Error: Incorrect Level Value!");
            }
            else
            {
                
pInfo[player1][pLevel] = LefeL;
                
GetPlayerName(player1dsnamesizeof(dsname));
                
format(stringsizeof(string), "12-StuntX- You have given Level %d to %s ",LefeL,dsname);
                
IRC_GroupSay(groupID,IRC_CHANNEL,string);
                
GetPlayerName(player1dsnamesizeof(dsname));
                
format(stringsizeof(string), "-StuntX- Player %s got promoted to level %d By Admin on (IRC)",dsname,LefeL);
                
SendClientMessageToAll(0xD2691EAAstring);
            }
        }
        else 
IRC_GroupSay(groupID,IRC_CHANNEL"12Player Is not loggedin!");
    }
    return 
1;

Reply
#7

Obviously you have trouble understanding me...

Fact is this section is for helping with troubles related to your code... You are here asking for code to be MADE FOR YOU.


Refer to here... https://sampforum.blast.hk/showthread.php?tid=447813

Quote:
Originally Posted by jlalt
Посмотреть сообщение
I am free so why not doing it for ya xd
I'll be sure to recommend that people hassle you for code to be made from now on... Just saying...

You'll soon grow tired of that once people see that they can simply ask for everything to be coded for them, with no charge, and no requirements.
Reply
#8

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
Obviously you have trouble understanding me...

Fact is this section is for helping with troubles related to your code... You are here asking for code to be MADE FOR YOU.


Refer to here... https://sampforum.blast.hk/showthread.php?tid=447813



I'll be sure to recommend that people hassle you for code to be made from now on... Just saying...

You'll soon grow tired of that once people see that they can simply ask for everything to be coded for them, with no charge, and no requirements.
I Understood you , You mean i just have to post a bug or anything here not create a command for me , next time will be fixed.
Reply
#9

Quote:
Originally Posted by jlalt
Посмотреть сообщение
I am free so why not doing it for ya xd

here you go: [ if that's what you meant... ]

PHP код:
IRCCMD:setlevel(botidchannel[], user[], host[], params[]) {
    if (
IRC_IsAdmin(botidchanneluser))
    {
        new 
playerid[MAX_PLAYER_NAME];
        new 
player1LefeLstring[128], dsname[MAX_PLAYER_NAME];
        if(
sscanf(params,"ii",player1,LefeL)) return IRC_GroupSay(groupID,IRC_CHANNEL"12USAGE: !settrialmod [playerid] [level]");
        if(
pInfo[player1][Logged] == 1)
        {
            if(
LefeL || LefeL /* change 8 with yar max level*/)
            {
                
IRC_GroupSay(groupID,IRC_CHANNEL"12Error: Incorrect Level Value!");
            }
            else
            {
                
pInfo[player1][pLevel] = LefeL;
                
GetPlayerName(player1dsnamesizeof(dsname));
                
format(stringsizeof(string), "12-StuntX- You have given Level %d to %s ",LefeL,dsname);
                
IRC_GroupSay(groupID,IRC_CHANNEL,string);
                
GetPlayerName(player1dsnamesizeof(dsname));
                
format(stringsizeof(string), "-StuntX- Player %s got promoted to level %d By Admin on (IRC)",dsname,LefeL);
                
SendClientMessageToAll(0xD2691EAAstring);
            }
        }
        else 
IRC_GroupSay(groupID,IRC_CHANNEL"12Player Is not loggedin!");
    }
    return 
1;

Thanks for your help , It Compiled. :3
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)