vendredi 22 juillet 2016

[HELP] how to fix all this warnings

Let's block ads! (Why?)



[HELP] how to fix all this warnings

Huge Clucker

 

Join Date: Jan 2016

Posts: 210

Reputation: 17

DefaultRe: [HELP] how to fix all this warnings

Try this:

PHP Code:

stock ABroadCast(color,string[],level)
{
    foreach(
Playeri)
    {
        if(
PlayerInfo[i][pAdmin] >= 1)
        {
            
level PlayerInfo[i][pAdmin];
            
SendClientMessage(icolorstring);
        }
    }
    return 
1;

PHP Code:

CMD:admute(playeridparams[])
{
    if(
PlayerInfo[playerid][pAdmin] >= || PlayerInfo[playerid][pHelper] >= || PlayerInfo[playerid][pModerator] >= 1)
    {
        new 
string[128], giveplayerid;
        if(
sscanf(params"u"giveplayerid)) return SendClientMessage(playeridCOLOR_WHITE"USAGE: /admute [playerid/partofname]");
        if(
IsPlayerConnected(giveplayerid))
        {
            if(
PlayerInfo[giveplayerid][pAdmin] >= 1)
            {
                return 
SendClientMessage(playeridCOLOR_LIGHTRED"You not authorized to mute administrators.");
            }
            if(
PlayerInfo[giveplayerid][pHelper] >= && PlayerInfo[playerid][pAdmin] < 3)
            {
                return 
SendClientMessage(playeridCOLOR_GREY"You're not authorized to mute helpers.");
            }
            if(
PlayerInfo[giveplayerid][pADMute] == 0)
            {
                
PlayerInfo[giveplayerid][pADMute] = 1;
                
PlayerInfo[giveplayerid][pADMuteTotal] += 1;
                
szAdvert[giveplayerid][0] = 0;
                
format(stringsizeof(string), "StaffCmd: %s was muted from advertising by %s"GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid));
                
Log("logs/admin.log"string);
                
ABroadCast(COLOR_LIGHTRED,string,1);
                if(
PlayerInfo[giveplayerid][pADMuteTotal] > 6)
                {
                    new 
playerip[32];
                    
GetPlayerIp(giveplayeridplayeripsizeof(playerip));
                    
format(stringsizeof(string), "AdmCmd: %s(IP:%s) was banned by %s, reason: Excessive advertisement mutes"GetPlayerNameEx(giveplayerid),playerip,GetPlayerNameEx(playerid));
                    
Log("logs/ban.log"string);
                    
format(stringsizeof(string), "AdmCmd: %s was banned, reason: Excessive advertisement mutes."GetPlayerNameEx(giveplayerid));
                    
SendClientMessageToAllEx(COLOR_LIGHTREDstring);
                    
PlayerInfo[giveplayerid][pBanned] = 1;
                    new 
ip[32];
                    
GetPlayerIp(giveplayerid,ip,sizeof(ip));
                    
AddBan(ip);
                    
Kick(giveplayerid);
                }
                
SendClientMessage(giveplayeridCOLOR_LIGHTRED"Remember, advertisements may only be used for IC purposes and may not be used for any other purpose, unless stated otherwise by an admin.");
                
SendClientMessage(giveplayeridCOLOR_LIGHTRED"If you wish to be unmuted, please use '/report'. Future abuse could result in increased punishment.");
                
format(stringsizeof(string), "StaffCmd: %s was muted from advertisments by %s"GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid));
                
SendClientMessageToAllEx(COLOR_YELLOWstring);
            }
            else if(
PlayerInfo[giveplayerid][pADMute] == 1)
            {
                if(
PlayerInfo[giveplayerid][pJailed] != 0)
                {
                    
SendClientMessage(playeridCOLOR_LIGHTRED"You can't offer someone in jail/prison an unmute!");
                    
//SendClientMessage(giveplayerid, COLOR_LIGHTRED, "Sorry, you can't be unmuted from /ad while you're in jail/prison.");
                    
return 1;
                }
                else
                {
                    
ShowAdMuteFine(giveplayerid);
                    
format(stringsizeof(string), "* %s has offered you an unmute from /ad."GetPlayerNameEx(playerid));
                    
SendClientMessageEx(giveplayeridCOLOR_LIGHTBLUEstring);
                    
format(stringsizeof(string), "StaffCmd: %s has offered %s an unmute from advertisments."GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
                    foreach(
Playeri)
                    {
                        if(
PlayerInfo[i][pHelper] >= || PlayerInfo[i][pAdmin] >= 1)
                        {
                            
SendClientMessage(iCOLOR_YELLOWstring);
                        }
                    }
                }
            }
        }
    }
    else
    {
        
SendClientMessage(playeridCOLOR_GRAD1"You are not autorized to use this command!");
    }
    return 
1;

PHP Code:

CMD:permaban(playeridparams[])
{
    return 
SendClientMessage(playeridCOLOR_GREY"This command has been disabled.");
    if(
PlayerInfo[playerid][pAdmin] >= 4)
    {
        new 
string[128], giveplayeridreason[64];
        if(
sscanf(params"us[64]"giveplayeridreason))
        {
            
SendClientMessage(playeridCOLOR_WHITE"USAGE: /permaban [playerid/partofname] [reason]");
            return 
1;
        }
        
//if(AntiAdv(playerid, params)) return 1;
        
if(IsPlayerConnected(giveplayerid))
        {
            if(
PlayerInfo[giveplayerid][pAdmin])
            {
                
/*if(AdminDuty[playerid] == 1)
                {
                    new username[MAX_PLAYER_NAME];
                    GetPVarString(playerid, "TempNameName", username, sizeof(username));
                    SetPVarInt(playerid, "TempName", 0);
                    SetPlayerName(playerid, username);
                }
                format(string, sizeof(string), "AdmCmd: %s has been auto-banned, reason: Trying to /permaban a higher admin.", PlayerInfo[playerid][pAdminName]);
                ABroadCast(COLOR_YELLOW,string,2);
                PlayerInfo[playerid][pBanned] = 3;
                new ip[32];
                GetPlayerIp(playerid,ip,sizeof(ip));
                AddBan(ip);
                Kick(playerid);*/
                
SendClientMessageEx(playeridCOLOR_GREY"You cannot permaban administrators.");
            }
            else
            {
                new 
playerip[32];
                
GetPlayerIp(giveplayeridplayeripsizeof(playerip));
                if(
AdminDuty[giveplayerid] == 1)
                {
                    new 
username[MAX_PLAYER_NAME];
                    
GetPVarString(giveplayerid"TempNameName"usernamesizeof(username));
                    
SetPVarInt(giveplayerid"TempName"0);
                    
SetPlayerName(giveplayeridusername);
                    
format(stringsizeof(string), "AdmCmd: %s(IP:%s) was permanently banned by %s, reason: %s"PlayerInfo[giveplayerid][pAdminName], playeripGetPlayerNameEx(playerid), reason);
                    
Log("logs/ban.log"string);
                    
format(stringsizeof(string), "AdmCmd: %s was permanently banned by %s, reason: %s"PlayerInfo[giveplayerid][pAdminName], GetPlayerNameEx(playerid), reason);
                }
                else
                {
                    
format(stringsizeof(string), "AdmCmd: %s(IP:%s) was permanently banned by %s, reason: %s"GetPlayerNameEx(giveplayerid), playeripGetPlayerNameEx(playerid), reason);
                    
Log("logs/ban.log"string);
                    
format(stringsizeof(string), "AdmCmd: %s was permanently banned by %s, reason: %s"GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid), reason);
                }
                
SendClientMessageToAllEx(COLOR_LIGHTREDstring);
                
PlayerInfo[giveplayerid][pPermaBanned] = 1;
                new 
ip[32];
                
GetPlayerIp(giveplayerid,ip,sizeof(ip));
                
AddBan(ip);
                
Kick(giveplayerid);
            }
            return 
1;
        }
    }
    else 
SendClientMessage(playeridCOLOR_GRAD1"Invalid player specified.");
    return 
1;


PHP Code:

CMD:f(playeridparams[]) {
if(
gFam[playerid] == 1)
return 
SendClientMessage(playeridTEAM_CYAN_COLOR"You have your family chat disabled; /togfamily!");
new 
string[128];
if(
isnull(params))
return 
SendClientMessage(playeridCOLOR_GREY"USAGE: (/f)amily [family chat]");
//if(AntiAdv(playerid, params)) return 1;
if(PlayerCuffed[playerid] > || GetPVarInt(playerid"Injured") == 1)
return 
SendClientMessage(playeridCOLOR_GREY"You can't talk over /f while you're cuffed, hospitalized or tazed.");
if(
PlayerInfo[playerid][pFaction] >= || PlayerInfo[playerid][pGang] < 255) {
new 
fam PlayerInfo[playerid][pGang];
new
szRank[64],
szDivision[64],
szEmployer[64];
GetPlayerFactionInfo(playeridszRankszDivisionszEmployer);
if(
PlayerInfo[playerid][pFaction] != && PlayerInfo[playerid][pFaction] > 0) {
format(stringsizeof(string), "** (( %s %s: %s )) **"szRankGetPlayerNameEx(playerid), params);
SendFamilyMessage(PlayerInfo[playerid][pFaction], TEAM_AZTECAS_COLORstring);
}
else if(
PlayerInfo[playerid][pFaction] == 4)
{
    
format(stringsizeof(string), "** %s %s %s: %s **"szDivisionszRankGetPlayerNameEx(playerid), params);
    
SendFamilyMessage(PlayerInfo[playerid][pFaction], TEAM_AZTECAS_COLORstring);
}
else if(
PlayerInfo[playerid][pGang] < 255) {
new
szMessage[128],
szRank[64];
switch(
PlayerInfo[playerid][pRank])
{
    case 
1format(szRanksizeof(szRank), "%s"FamilyInfo[PlayerInfo[playerid][pGang]][FamilyRank1]);
    case 
2format(szRanksizeof(szRank), "%s"FamilyInfo[PlayerInfo[playerid][pGang]][FamilyRank2]);
    case 
3format(szRanksizeof(szRank), "%s"FamilyInfo[PlayerInfo[playerid][pGang]][FamilyRank3]);
    case 
4format(szRanksizeof(szRank), "%s"FamilyInfo[PlayerInfo[playerid][pGang]][FamilyRank4]);
    case 
5format(szRanksizeof(szRank), "%s"FamilyInfo[PlayerInfo[playerid][pGang]][FamilyRank5]);
    case 
6format(szRanksizeof(szRank), "%s"FamilyInfo[PlayerInfo[playerid][pGang]][FamilyRank6]);
    default: 
format(szRanksizeof(szRank), "%s"FamilyInfo[PlayerInfo[playerid][pGang]][FamilyRank1]);
}
if(
PlayerInfo[playerid][pCrew1] == PlayerInfo[playerid][pGang]) { format(szMessagesizeof(szMessage), "** (%i) %s %s (%s): %s **"PlayerInfo[playerid][pRank], szRankGetPlayerNameEx(playerid),FamilyInfo[playerid][FamilyCrewname1], params); }
else if(
PlayerInfo[playerid][pCrew2] == PlayerInfo[playerid][pGang]) { format(szMessagesizeof(szMessage), "** (%i) %s %s (%s): %s **"PlayerInfo[playerid][pRank], szRankGetPlayerNameEx(playerid),FamilyInfo[playerid][FamilyCrewname2], params); }
else if(
PlayerInfo[playerid][pCrew3] == PlayerInfo[playerid][pGang]) { format(szMessagesizeof(szMessage), "** (%i) %s %s (%s): %s **"PlayerInfo[playerid][pRank], szRankGetPlayerNameEx(playerid),FamilyInfo[playerid][FamilyCrewname3], params); }
else { 
format(szMessagesizeof(szMessage), "** (%i) %s %s: %s **"PlayerInfo[playerid][pRank], szRankGetPlayerNameEx(playerid), params); }
SendNewFamilyMessage(PlayerInfo[playerid][pGang], TEAM_AZTECAS_COLORszMessage);
}
return 
1;
}
else 
SendClientMessage(playeridCOLOR_GRAD2"You're not a part of a Family!");
return 
1;

PHP Code:

CMD:sethelper(playeridparams[]) {
if(
PlayerInfo[playerid][pAdmin] >= || PlayerInfo[playerid][pHelper] >= || IsPlayerAdmin(playerid)) {
new
iLevel,
iTarget;
if(
sscanf(params"ud"iTargetiLevel))
return 
SendClientMessage(playeridCOLOR_GREY"USAGE: /sethelper [playerid/partofname] [level]");
if(
iLevel <= -|| iLevel >= 6)
return 
SendClientMessage(playeridCOLOR_GREY"Valid helper levels start from 1 and end at 4.");
if(
iTarget != INVALID_PLAYER_ID) {
if(
iLevel >= && PlayerInfo[playerid][pAdmin] < && PlayerInfo[playerid][pHelper] < 5)
return 
SendClientMessage(playeridCOLOR_GREY"Only server management may set that helper status.");
new
szMessage[128];
PlayerInfo[iTarget][pHelper] = iLevel;
switch(
PlayerInfo[playerid][pHelper])
{
    case 
3:
    {
        switch(
iLevel)
        {
            case 
0format(szMessagesizeof(szMessage), "> {33CCFF} HelpCmd: Assistant Head Helper %s has removed %s from the helper team."GetPlayerNameEx(playerid), GetPlayerNameEx(iTarget));
            case 
1format(szMessagesizeof(szMessage), "> {33CCFF} HelpCmd: Assistant Head Helper %s has made %s a Junior Helper."GetPlayerNameEx(playerid), GetPlayerNameEx(iTarget));
            case 
2format(szMessagesizeof(szMessage), "> {33CCFF} HelpCmd: Assistant Head Helper %s has made %s a Senior Helper."GetPlayerNameEx(playerid), GetPlayerNameEx(iTarget));
            case 
3format(szMessagesizeof(szMessage), "> {33CCFF} HelpCmd: Administrator %s has made %s the Assistant Head Helper."GetPlayerNameEx(playerid), GetPlayerNameEx(iTarget));
            case 
4format(szMessagesizeof(szMessage), "> {33CCFF} HelpCmd: Administrator %s has made %s the Head Helper."GetPlayerNameEx(playerid), GetPlayerNameEx(iTarget));
            case 
5format(szMessagesizeof(szMessage), "> {33CCFF} HelpCmd: Administrator %s has made %s Helper Management."GetPlayerNameEx(playerid), GetPlayerNameEx(iTarget));
        }
    }
    case 
4:
    {
        switch(
iLevel)
        {
            case 
0format(szMessagesizeof(szMessage), "> {33CCFF} HelpCmd: Head Helper %s has removed %s from the helper team."GetPlayerNameEx(playerid), GetPlayerNameEx(iTarget));
            case 
1format(szMessagesizeof(szMessage), "> {33CCFF} HelpCmd: Head Helper %s has made %s a Junior Helper."GetPlayerNameEx(playerid), GetPlayerNameEx(iTarget));
            case 
2format(szMessagesizeof(szMessage), "> {33CCFF} HelpCmd: Head Helper %s has made %s a Senior Helper."GetPlayerNameEx(playerid), GetPlayerNameEx(iTarget));
            case 
3format(szMessagesizeof(szMessage), "> {33CCFF} HelpCmd: Administrator %s has made %s the Assistant Head Helper."GetPlayerNameEx(playerid), GetPlayerNameEx(iTarget));
            case 
4format(szMessagesizeof(szMessage), "> {33CCFF} HelpCmd: Administrator %s has made %s the Head Helper."GetPlayerNameEx(playerid), GetPlayerNameEx(iTarget));
            case 
5format(szMessagesizeof(szMessage), "> {33CCFF} HelpCmd: Administrator %s has made %s Helper Management."GetPlayerNameEx(playerid), GetPlayerNameEx(iTarget));
        }
    }
    default:
    {
        switch(
iLevel)
        {
            case 
0format(szMessagesizeof(szMessage), "> {33CCFF} HelpCmd: Administrator %s has removed %s from the helper team."GetPlayerNameEx(playerid), GetPlayerNameEx(iTarget));
            case 
1format(szMessagesizeof(szMessage), "> {33CCFF} HelpCmd: Administrator %s has made %s a Junior Helper."GetPlayerNameEx(playerid), GetPlayerNameEx(iTarget));
            case 
2format(szMessagesizeof(szMessage), "> {33CCFF} HelpCmd: Administrator %s has made %s a Senior Helper."GetPlayerNameEx(playerid), GetPlayerNameEx(iTarget));
            case 
3format(szMessagesizeof(szMessage), "> {33CCFF} HelpCmd: Administrator %s has made %s the Assistant Head Helper."GetPlayerNameEx(playerid), GetPlayerNameEx(iTarget));
            case 
4format(szMessagesizeof(szMessage), "> {33CCFF} HelpCmd: Administrator %s has made %s Head Helper."GetPlayerNameEx(playerid), GetPlayerNameEx(iTarget));
            case 
5format(szMessagesizeof(szMessage), "> {33CCFF} HelpCmd: Administrator %s has made %s Helper Management."GetPlayerNameEx(playerid), GetPlayerNameEx(iTarget));
        }
    }
}
foreach(
Playerx)
{
    if(
PlayerInfo[x][pHelper] >= || PlayerInfo[x][pAdmin] >= || PlayerInfo[x][pModerator] >= 1)
    {
        
SendClientMessage(xCOLOR_YELLOWszMessage);
    }
}
/*if(PlayerInfo[iTarget][pAcceptReport] > 0)
PlayerInfo[iTarget][pAcceptReport] = 0;*/
}
else 
SendClientMessage(playeridCOLOR_GRAD2"Invalid player specified.");
}
else 
SendClientMessage(playeridCOLOR_GRAD1"You are not autorized to use this commands!");
return 
1;

__________________
Who asks for the reputation doesn't deserve it, who doesn't ask for it deserves it.

My works:

Aucun commentaire:

Enregistrer un commentaire