Admin Command Help? -
Tass007 - 19.06.2013
I have two types of commands
Here's one set
pawn Код:
CMD:o(playerid,params[]) {
#pragma unused params
if(PlayerInfo[playerid][Level] >= 7) {
new string[128]; format(string, sizeof(string), "[OWNER] %s: %s", PlayerName2(playerid), params[0] );
MessageToAdmins(green,string);
} else return SendClientMessage(playerid,red,"ERROR: You need to be owner to use this command");
return 1;
}
CMD:a(playerid,params[]) {
#pragma unused params
if(PlayerInfo[playerid][Level] >= 3) {
new string[128]; format(string, sizeof(string), "[ADMIN] %s: %s", PlayerName2(playerid), params[0] );
MessageToAdmins(green,string);
} else return SendClientMessage(playerid,red,"ERROR: You need to be admin to use this command");
return 1;
}
CMD:m(playerid,params[]) {
#pragma unused params
if(PlayerInfo[playerid][Level] >= 2) {
new string[128]; format(string, sizeof(string), "[MOD] %s: %s", PlayerName2(playerid), params[0] );
MessageToAdmins(green,string);
} else return SendClientMessage(playerid,red,"ERROR: You need to be moderator to use this command");
return 1;
}
CMD:v(playerid,params[]) {
#pragma unused params
if(PlayerInfo[playerid][Level] >= 1) {
new string[128]; format(string, sizeof(string), "[VIP] %s: %s", PlayerName2(playerid), params[0] );
MessageToAdmins(green,string);
} else return SendClientMessage(playerid,red,"ERROR: You need to be a VIP to use this command");
return 1;
}
And the second code
pawn Код:
//==============================================================================
// Vip Chat
//==============================================================================
if(text[0] == '*' && AccInfo[playerid][pVip] >= 1)
{
new string[128]; GetPlayerName(playerid,string,sizeof(string));
format(string,sizeof(string),"|ChatVip| %s: %s",string,text[1]);
MessageToPlayerVIP(0xDC686BAA,string);
SaveIn("ChatVipLog",string);
return 0;
}
//==============================================================================
// Administration Chat
//==============================================================================
if(text[0] == '#' && AccInfo[playerid][Level] >= 1)
{
new string[128]; GetPlayerName(playerid,string,sizeof(string));
format(string,sizeof(string),"Admin Chat: %s: %s",string,text[1]);
MessageToAdmins(green,string);
GetPlayerName(playerid,string,sizeof(string));
format(string,sizeof(string),"9Admin Chat: %s: %s",string,text[1]);
IRC_GroupSay(gGroupID2, IRC_ADMINCHANNEL, string);
#if ADM_CHAT_LOG == true
SaveIn("AdmChatLog",string);
#endif
return 0;
}
I would like the first code converted into the second code could anyone help me in doing so?
Re: Admin Command Help? -
Tass007 - 20.06.2013
BUMP
Re: Admin Command Help? -
SwisherSweet - 20.06.2013
pawn Код:
if(text[0] == '$' && AccInfo[playerid][Level] >= 2)
{
new string[128]; GetPlayerName(playerid,string,sizeof(string));
format(string,sizeof(string),"Owner Chat: %s: %s",string,text[1]);
MessageToOwners(green,string);
GetPlayerName(playerid,string,sizeof(string));
format(string,sizeof(string),"9Owner Chat: %s: %s",string,text[1]);
IRC_GroupSay(gGroupID4, IRC_ADMINCHANNEL, string);
#if ADM_CHAT_LOG == true
SaveIn("AdmChatLog",string);
#endif
return 0;
}
just change the levels and stuff the text should work fine.
i don't even get why you need our help when you have 2 codes like that already all you need to change it text and 1 number?
Re: Admin Command Help? -
Tass007 - 20.06.2013
Because when I tryed doing it it complete failed
Re: Admin Command Help? -
Tass007 - 20.06.2013
And I don't want it as a symbol I want it as a cmd like /o and /v
Re: Admin Command Help? -
SwisherSweet - 20.06.2013
so what exactly is it you want? im not following you here, you want them into symbols or into cmds?
Re: Admin Command Help? -
SilverKiller - 20.06.2013
I will give you a code with symbols (In the second code you used different admin variables so i will use the admin variables of the second code..)
pawn Код:
if(text[0] == '*' && AccInfo[playerid][pVip] >= 1)
{
new string[128]; GetPlayerName(playerid,string,sizeof(string));
format(string,sizeof(string),"|ChatVip| %s: %s",string,text[1]);
MessageToPlayerVIP(0xDC686BAA,string);
SaveIn("ChatVipLog",string);
return 0;
}
if(text[0] == '#' && AccInfo[playerid][Level] >= 1)
{
new string[128]; GetPlayerName(playerid,string,sizeof(string));
format(string,sizeof(string),"Admin Chat: %s: %s",string,text[1]);
MessageToAdmins(green,string);
GetPlayerName(playerid,string,sizeof(string));
format(string,sizeof(string),"9Admin Chat: %s: %s",string,text[1]);
IRC_GroupSay(gGroupID2, IRC_ADMINCHANNEL, string);
#if ADM_CHAT_LOG == true
SaveIn("AdmChatLog",string);
#endif
return 0;
}
if(text[0] == '}' && AccInfo[playerid][Level] >= 2)
{
new string[128];
GetPlayerName(playerid, string, sizeof(string));
format(string, 128, "Mod Chat: %s: %s", string, text[1]);
MessageToAdmins(green, string);
new name[128];
new string2[128];
GetPlayerName(playerid, name, sizeof(name));
format(string2, 128, "IRC Mod Chat: %s: %s", name, text[1]);
IRC_GroupSay(gGroupID2, IRC_ADMINCHANNEL, string2);
#if ADM_CHAT_LOG == true
SaveIn("AdminChatLog", string2);
return 0;
}
if(text[0] == '{' && AccInfo[playerid][Level] >= 7)
{
new oname[25];
GetPlayerName(playerid, oname, sizeof(oname));
new ostirng[128];
format(ostring, 128, "Owner Chat: %s: %s", oname, text[1]);
MessageToAdmins(green, ostring);
}
Re: Admin Command Help? -
Tass007 - 20.06.2013
No i want the symbol code converted into the cmd like /o...
Re: Admin Command Help? -
Tass007 - 22.06.2013
BUMP
Please help me