Support Manager -
RomaNScripteR - 21.07.2017
Hello I was scripting, I added support manager in my previous script but that was cracked. I again tried it on my script in which it wasn't, but I forgot something about it. I had made smlvl by seeing olvl and elvl. I had made Support Manager system before by /setomang
Code here :
PHP код:
CMD:setomang(playerid, params[])
{
new giveplayerid, moneys1, giveplayer[25], string[256], playername[25];
if (adlvl[playerid] < 6) return 0;
if (sscanf(params, "ud", giveplayerid, moneys1)) return SendClientMessage2(playerid, COLOR_WHITE, "Usage: /setomang [playerid] [0 = Kick Org Manager, 1 = Set Org Manager]");
if (!IsPlayerConnected2(giveplayerid)) return SendClientMessage2(playerid, COLOR_RED, "Error: Inactive player id!");
if (moneys1 < 0 || moneys1 > 1) return SendClientMessage2(playerid, COLOR_RED, "Error: 0 = Kick Org Manager, 1 = Set Org Manager.");
if (Logged[giveplayerid] == 0) return SendClientMessage2(playerid, COLOR_WHITE, "Error: Player isn't logged in.");
GetPlayerName(giveplayerid, giveplayer, MAX_PLAYER_NAME);
if (moneys1 == olvl[giveplayerid])
{
if (giveplayerid != playerid)
{
if (moneys1 == 0)
{
format(string, 64, "%s is not set as a Org Manager.", giveplayer);
SendClientMessage2(playerid, COLOR_WHITE, string);
}
else
{
format(string, 64, "%s is already set as a Org Manager.", giveplayer);
SendClientMessage2(playerid, COLOR_WHITE, string);
}
}
else
{
if (moneys1 == 0) SendClientMessage2(playerid, COLOR_WHITE, "You are not set as a Org Manager.");
else SendClientMessage2(playerid, COLOR_WHITE, "You are already set as a Org Manager.");
}
return 1;
}
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
if (moneys1 != 0)
{
dini_IntSet(AddDirFile(dir_userfiles, giveplayer), "omanager", moneys1);
dini_IntSet(AddDirFile(dir_datafiles, FILE_SUPPORTMEMBERS), giveplayer, 1);
if (giveplayerid != playerid)
{
SendClientMessage2(giveplayerid, COLOR_YELLOW, "You have been set as a Org Manager.");
SendPlayerFormattedText(playerid, COLOR_YELLOW, "You have set %s as a Org Manager.", giveplayer, "");
}
else SendClientMessage2(playerid, COLOR_YELLOW, "You have set yourself as a Org Manager.");
}
else
{
dini_Unset(AddDirFile(dir_userfiles, giveplayer), "omanager");
dini_Unset(AddDirFile(dir_datafiles, FILE_SUPPORTMEMBERS), giveplayer);
if (giveplayerid != playerid)
{
SendClientMessage2(giveplayerid, COLOR_WHITE, "You have been removed as a Org Manager.");
SendPlayerFormattedText(playerid, COLOR_WHITE, "You have removed %s as a Org Manager.", giveplayer, "");
}
else SendClientMessage2(playerid, COLOR_WHITE, "You have removed yourself as a Org Manager.");
}
olvl[giveplayerid] = moneys1;
return 1;
}
Tell me how to make Support Manager back
Re: Support Manager -
SilverScripter - 21.07.2017
PHP код:
#define FILE_SMANAGERS "smanagers"
new smlvl[PLAYERS];
CMD:setsmang(playerid, params[])
{
new giveplayerid, moneys1, giveplayer[25], string[256], playername[25];
if (adlvl[playerid] < 6) return 0;
if (sscanf(params, "ud", giveplayerid, moneys1)) return SendClientMessage2(playerid, COLOR_WHITE, "Usage: /setsmang [playerid] [0 = Kick Org Manager, 1 = Set Org Manager]");
if (!IsPlayerConnected2(giveplayerid)) return SendClientMessage2(playerid, COLOR_RED, "Error: Inactive player id!");
if (moneys1 < 0 || moneys1 > 1) return SendClientMessage2(playerid, COLOR_RED, "Error: 0 = Kick Org Manager, 1 = Set Org Manager.");
if (Logged[giveplayerid] == 0) return SendClientMessage2(playerid, COLOR_WHITE, "Error: Player isn't logged in.");
GetPlayerName(giveplayerid, giveplayer, MAX_PLAYER_NAME);
if (moneys1 == smlvl[giveplayerid])
{
if (giveplayerid != playerid)
{
if (moneys1 == 0)
{
format(string, 64, "%s is not set as a S Manager.", giveplayer);
SendClientMessage2(playerid, COLOR_WHITE, string);
}
else
{
format(string, 64, "%s is already set as a S Manager.", giveplayer);
SendClientMessage2(playerid, COLOR_WHITE, string);
}
}
else
{
if (moneys1 == 0) SendClientMessage2(playerid, COLOR_WHITE, "You are not set as a SManager.");
else SendClientMessage2(playerid, COLOR_WHITE, "You are already set as a SManager.");
}
return 1;
}
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
if (moneys1 != 0)
{
dini_IntSet(AddDirFile(dir_userfiles, giveplayer), "smanager", moneys1);
dini_IntSet(AddDirFile(dir_datafiles, FILE_SMANAGERS), giveplayer, 1);
if (giveplayerid != playerid)
{
SendClientMessage2(giveplayerid, COLOR_YELLOW, "You have been set as a SManager.");
SendPlayerFormattedText(playerid, COLOR_YELLOW, "You have set %s as a SManager.", giveplayer, "");
}
else SendClientMessage2(playerid, COLOR_YELLOW, "You have set yourself as a SManager.");
}
else
{
dini_Unset(AddDirFile(dir_userfiles, giveplayer), "smanager");
dini_Unset(AddDirFile(dir_datafiles, FILE_SMANAGERS), giveplayer);
if (giveplayerid != playerid)
{
SendClientMessage2(giveplayerid, COLOR_WHITE, "You have been removed as a SManager.");
SendPlayerFormattedText(playerid, COLOR_WHITE, "You have removed %s as a SManager.", giveplayer, "");
}
else SendClientMessage2(playerid, COLOR_WHITE, "You have removed yourself as a SManager.");
}
smlvl[giveplayerid] = moneys1;
return 1;
}
To Get Shown /smanagers Go Here
PHP код:
#define S_LEVEL_1 "Support Manager"
stock SMLVL(lvl)
{
new string[128];
switch(lvl)
{
case 1:
{
format(string, 128, "%s %s", LEVEL_1_COLOR, S_LEVEL_1);
}
}
return string;
}
CMD:smembers(playerid, params[])
{
new moneys1, string[128];
for (new i = 0; i < PLAYERS; i++)
{
if (IsPlayerConnected2(i))
{
if (smlvl[playerid] > 0)
{
moneys1++;
}
else if(smlvl[playerid] == 1)
{
if(smlvl[playerid] > 0)
{
moneys1++;
}
}
}
}
if (moneys1 != 0)
{
SendClientMessage(playerid, COLOR_ADMIN, "• • Online Support Managers• •");
new p=6;
while (p > 0)
{
for (new i = 0; i < PLAYERS; i++)
{
if (smlvl[i] == p)
{
format(string, 128, "{FFFFFF}%s", RPN(i), SMLVL(p),p);
SendClientMessage(playerid, COLOR_WHITE, string);
}
else if(smlvl[i] == p)
{
if(smlvl[playerid] == 1)
{
format(string, 128, "{FFFFFF}%s", RPN(i), SMLVL(p),p);
SendClientMessage(playerid, COLOR_WHITE, string);
}
}
}
p--;
}
}
else SendClientMessage(playerid, COLOR_RED, "There are currently no support managers online.");
return 1;
}
TRY THIS
If I Helped Repp++ Me
Re: Support Manager -
RomaNScripteR - 21.07.2017
Thank you very much SilverScripter
And yes rep++
Re: Support Manager -
SilverScripter - 21.07.2017
Need Any More Help PM Me
Re: Support Manager -
Sew_Sumi - 21.07.2017
This "PM Me", defeats the purpose of the forums themselves...
Along with pasting up code to simply fix peoples code. You don't explain what's broken, what you fixed, or how to script at all.
Re: Support Manager -
silverms - 21.07.2017
lol u stealer I made that script anyways setomang doesn't need 20 lines of coding nub