Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Support Manager

$
0
0
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 Code:

CMD:setomang(playeridparams[])
{
    new 
giveplayeridmoneys1giveplayer[25], string[256], playername[25];
    if (
adlvl[playerid] < 6) return 0;
    if (
sscanf(params"ud"giveplayeridmoneys1)) return SendClientMessage2(playeridCOLOR_WHITE"Usage: /setomang [playerid] [0 = Kick Org Manager, 1 = Set Org Manager]");
    if (!
IsPlayerConnected2(giveplayerid)) return SendClientMessage2(playeridCOLOR_RED"Error: Inactive player id!");
    if (
moneys1 || moneys1 1) return SendClientMessage2(playeridCOLOR_RED"Error: 0 = Kick Org Manager, 1 = Set Org Manager.");
    if (
Logged[giveplayerid] == 0) return SendClientMessage2(playeridCOLOR_WHITE"Error: Player isn't logged in.");
    
GetPlayerName(giveplayeridgiveplayerMAX_PLAYER_NAME);
    if (
moneys1 == olvl[giveplayerid])
    {
        if (
giveplayerid != playerid)
        {
            if (
moneys1 == 0)
            {
                
format(string64"%s is not set as a Org Manager."giveplayer);
                
SendClientMessage2(playeridCOLOR_WHITEstring);
            }
            else
            {
                
format(string64"%s is already set as a Org Manager."giveplayer);
                
SendClientMessage2(playeridCOLOR_WHITEstring);
            }
        }
        else
        {
            if (
moneys1 == 0SendClientMessage2(playeridCOLOR_WHITE"You are not set as a Org Manager.");
            else 
SendClientMessage2(playeridCOLOR_WHITE"You are already set as a Org Manager.");
        }
        return 
1;
    }
    
GetPlayerName(playeridplayernameMAX_PLAYER_NAME);
    if (
moneys1 != 0)
    {
        
dini_IntSet(AddDirFile(dir_userfilesgiveplayer), "omanager"moneys1);
        
dini_IntSet(AddDirFile(dir_datafilesFILE_SUPPORTMEMBERS), giveplayer1);
        if (
giveplayerid != playerid)
        {
            
SendClientMessage2(giveplayeridCOLOR_YELLOW"You have been set as a Org Manager.");
            
SendPlayerFormattedText(playeridCOLOR_YELLOW"You have set %s as a Org Manager."giveplayer"");
        }
        else 
SendClientMessage2(playeridCOLOR_YELLOW"You have set yourself as a Org Manager.");
    }
    else
    {
        
dini_Unset(AddDirFile(dir_userfilesgiveplayer), "omanager");
        
dini_Unset(AddDirFile(dir_datafilesFILE_SUPPORTMEMBERS), giveplayer);
        if (
giveplayerid != playerid)
        {
            
SendClientMessage2(giveplayeridCOLOR_WHITE"You have been removed as a Org Manager.");
            
SendPlayerFormattedText(playeridCOLOR_WHITE"You have removed %s as a Org Manager."giveplayer"");
        }
        else 
SendClientMessage2(playeridCOLOR_WHITE"You have removed yourself as a Org Manager.");
    }
    
olvl[giveplayerid] = moneys1;
    return 
1;


Tell me how to make Support Manager back

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>