IRCCMD:setlevel Help -
Ultraz - 29.08.2016
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
Re: IRCCMD:setlevel Help -
J0sh... - 29.08.2016
pInfo[player1][pLevel] >= 1;

Why not pInfo[player1][pLevel] = 1;
Re: IRCCMD:setlevel Help -
Ultraz - 29.08.2016
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 .
Re: IRCCMD:setlevel Help -
Sew_Sumi - 29.08.2016
This isn't script for you, and your indentation is terrible.
Re: IRCCMD:setlevel Help -
Ultraz - 29.08.2016
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?
Re: IRCCMD:setlevel Help -
jlalt - 29.08.2016
I am free so why not doing it for ya xd
here you go: [ if that's what you meant... ]
PHP код:
IRCCMD:setlevel(botid, channel[], user[], host[], params[]) {
if (IRC_IsAdmin(botid, channel, user))
{
new playerid[MAX_PLAYER_NAME];
new player1, LefeL, string[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 < 0 || LefeL > 8 /* change 8 with yar max level*/)
{
IRC_GroupSay(groupID,IRC_CHANNEL, "12Error: Incorrect Level Value!");
}
else
{
pInfo[player1][pLevel] = LefeL;
GetPlayerName(player1, dsname, sizeof(dsname));
format(string, sizeof(string), "12-StuntX- You have given Level %d to %s ",LefeL,dsname);
IRC_GroupSay(groupID,IRC_CHANNEL,string);
GetPlayerName(player1, dsname, sizeof(dsname));
format(string, sizeof(string), "-StuntX- Player %s got promoted to level %d By Admin on (IRC)",dsname,LefeL);
SendClientMessageToAll(0xD2691EAA, string);
}
}
else IRC_GroupSay(groupID,IRC_CHANNEL, "12Player Is not loggedin!");
}
return 1;
}
Re: IRCCMD:setlevel Help -
Sew_Sumi - 29.08.2016
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.
Re: IRCCMD:setlevel Help -
Ultraz - 29.08.2016
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.
Re: IRCCMD:setlevel Help -
Ultraz - 29.08.2016
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(botid, channel[], user[], host[], params[]) {
if (IRC_IsAdmin(botid, channel, user))
{
new playerid[MAX_PLAYER_NAME];
new player1, LefeL, string[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 < 0 || LefeL > 8 /* change 8 with yar max level*/)
{
IRC_GroupSay(groupID,IRC_CHANNEL, "12Error: Incorrect Level Value!");
}
else
{
pInfo[player1][pLevel] = LefeL;
GetPlayerName(player1, dsname, sizeof(dsname));
format(string, sizeof(string), "12-StuntX- You have given Level %d to %s ",LefeL,dsname);
IRC_GroupSay(groupID,IRC_CHANNEL,string);
GetPlayerName(player1, dsname, sizeof(dsname));
format(string, sizeof(string), "-StuntX- Player %s got promoted to level %d By Admin on (IRC)",dsname,LefeL);
SendClientMessageToAll(0xD2691EAA, string);
}
}
else IRC_GroupSay(groupID,IRC_CHANNEL, "12Player Is not loggedin!");
}
return 1;
}
|
Thanks for your help , It Compiled. :3