[Ajuda] /su
#1

Alguem por favor arruma esse Cod pra nao poder da /su em COP porque ta dando codigo ai em baixo
PHP код:
    if(strcmp(cmd"/suspeito"true) == || strcmp(cmd"/su"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            if(
OnDuty[playerid] != 1  && PlayerInfo[playerid][pMember] == && PlayerInfo[playerid][pMember] == && PlayerInfo[playerid][pMember] == 21 && PlayerInfo[playerid][pMember] == 14 && PlayerInfo[playerid][pMember] == && PlayerInfo[playerid][pMember] == 23)
            {
                
SendClientMessage(playeridCOLOR_GREY"   Vocк nгo estб indentificado, pegue seu crachб no LSPD HQ.");
                return 
1;
            }
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USO: (/su)speito [playerid/Parte-do-Nick] [descriзгo crime]");
                return 
1;
            }
            
giveplayerid ReturnUser(tmp);
            if(
PlayerInfo[playerid][pLeader] == || PlayerInfo[playerid][pLeader] == || PlayerInfo[playerid][pLeader] == 23 || PlayerInfo[playerid][pLeader] == || PlayerInfo[playerid][pLeader] == || PlayerInfo[playerid][pLeader] == 21 || PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pMember] == 21 || PlayerInfo[playerid][pMember] == 17|| PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pMember] == 23)
            {
                if(
IsPlayerConnected(giveplayerid))
                {
                    if(
giveplayerid != INVALID_PLAYER_ID)
                    {
                        if (
gTeam[giveplayerid] != || PlayerInfo[giveplayerid][pMember] != || PlayerInfo[giveplayerid][pLeader] != || PlayerInfo[giveplayerid][pLeader] != 21 || PlayerInfo[giveplayerid][pMember] != 21)
                        {
                            
GetPlayerName(giveplayeridgiveplayersizeof(giveplayer));
                            
GetPlayerName(playeridsendernamesizeof(sendername));
                            new 
length strlen(cmdtext);
                            while ((
idx length) && (cmdtext[idx] <= ' '))
                            {
                                
idx++;
                            }
                            new 
offset idx;
                            new 
result[64];
                            while ((
idx length) && ((idx offset) < (sizeof(result) - 1)))
                            {
                                
result[idx offset] = cmdtext[idx];
                                
idx++;
                            }
                            
result[idx offset] = EOS;
                            if(!
strlen(result))
                            {
                                
SendClientMessage(playeridCOLOR_GRAD2"USO: (/su)speito [playerid/Parte-do-Nick] [descriзгo crime]");
                                return 
1;
                            }
                            if(
giveplayerid == playerid) { SendClientMessage(playeridCOLOR_GREY"Vocк nгo pode se dar su!"); return 1; }
                            if(
strcmp(result,"DOP",true) == 0) { result "Desobediкncia a ordem policial"; }
                            if(
strcmp(result,"TH",true) == 0) { result "Tentativa de homicнdio"; }
                            if(
strcmp(result,"CS",true) == 0) { result "Cumplice de Sequestro"; }
                            if(
strcmp(result,"RM",true) == 0) { result "Rejeicao a Multa"; }
                            if(
strcmp(result,"AP",true) == 0) { result "Ajuste de pena"; }
                            if(
strcmp(result,"CA",true) == 0) { result "Contrabando de armas"; }
                            if(
strcmp(result,"CD",true) == 0) { result "Contrabando de drogas"; }
                            if(
strcmp(result,"RV",true) == 0) { result "Roubo de Veнculo"; }
                            if(
strcmp(result,"ACP",true) == 0) { result "Atentado contra Prefeitura"; }
                            if(
strcmp(result,"RM",true) == 0) { result "Rejeiзгo de multa"; }
                            if(
strcmp(result,"RP",true) == 0) { result "Resistencia a prisгo"; }
                            if(
strcmp(result,"ILR",true) == 0) { result "Invasгo a Local Restrito"; }
                            if(
strcmp(result,"RMD",true) == 0) { result "Rejeiзгo a Mostrar Documentos"; }
                            if(
strcmp(result,"DA",true) == 0) { result "Desacato б Autoridade"; }
                            if(
strcmp(result,"PIA",true) == 0) { result "Porte Ilegal de Armas"; }
                            if(
strcmp(result,"CF",true) == 0) { result "Cumplice de Fugas"; }
                            if(
WantedPoints[giveplayerid] == 0) { WantedPoints[giveplayerid] += 1; }
                            else{
WantedPoints[giveplayerid]+= 1;}
                            
SetPlayerCriminal(giveplayerid,playeridresult);
                            
WantedPoints[giveplayerid] += 1;
                            
TextDrawHideForPlayer(giveplayerid,tGP2[giveplayerid]);
                            
TextDrawShowForPlayer(giveplayerid,tGP3[giveplayerid]);
                            return 
1;
                        }
                        else
                        {
                            
SendClientMessage(playeridCOLOR_GRAD2"   Vocк nгo pode suspeitar de oficial !");
                        }
                    }
                }
                else
                {
                        
format(stringsizeof(string), "   %d nгo й um player ativo."giveplayerid);
                        
SendClientMessage(playeridCOLOR_GRAD1string);
                        return 
1;
                }
            }
            else
            {
                
SendClientMessage(playeridCOLOR_GRAD2"   Vocк nгo й PM / PF / FA !");
            }
        }
        return 
1;
    } 
Reply
#2

pawn Код:
if(strcmp(cmd, "/suspeito", true) == 0 || strcmp(cmd, "/su", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(OnDuty[playerid] != 1  && PlayerInfo[playerid][pMember] == 1 && PlayerInfo[playerid][pMember] == 3 && PlayerInfo[playerid][pMember] == 21 && PlayerInfo[playerid][pMember] == 14 && PlayerInfo[playerid][pMember] == 2 && PlayerInfo[playerid][pMember] == 23)
            {
                SendClientMessage(playerid, COLOR_GREY, "   Vocк nгo estб indentificado, pegue seu crachб no LSPD HQ.");
                return 1;
            }
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USO: (/su)speito [playerid/Parte-do-Nick] [descriзгo crime]");
                return 1;
            }
            giveplayerid = ReturnUser(tmp);
            if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pLeader] == 23 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pLeader] == 7 || PlayerInfo[playerid][pLeader] == 21 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pMember] == 21 || PlayerInfo[playerid][pMember] == 17|| PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pMember] == 23)
            {
                if(IsPlayerConnected(giveplayerid))
                {
                    if(giveplayerid != INVALID_PLAYER_ID)
                    {
                        if(!IsACop(giveplayerid))
                        {
                            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                            GetPlayerName(playerid, sendername, sizeof(sendername));
                            new length = strlen(cmdtext);
                            while ((idx < length) && (cmdtext[idx] <= ' '))
                            {
                                idx++;
                            }
                            new offset = idx;
                            new result[64];
                            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
                            {
                                result[idx - offset] = cmdtext[idx];
                                idx++;
                            }
                            result[idx - offset] = EOS;
                            if(!strlen(result))
                            {
                                SendClientMessage(playerid, COLOR_GRAD2, "USO: (/su)speito [playerid/Parte-do-Nick] [descriзгo crime]");
                                return 1;
                            }
                            if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "Vocк nгo pode se dar su!"); return 1; }
                            if(strcmp(result,"DOP",true) == 0) { result = "Desobediкncia a ordem policial"; }
                            if(strcmp(result,"TH",true) == 0) { result = "Tentativa de homicнdio"; }
                            if(strcmp(result,"CS",true) == 0) { result = "Cumplice de Sequestro"; }
                            if(strcmp(result,"RM",true) == 0) { result = "Rejeicao a Multa"; }
                            if(strcmp(result,"AP",true) == 0) { result = "Ajuste de pena"; }
                            if(strcmp(result,"CA",true) == 0) { result = "Contrabando de armas"; }
                            if(strcmp(result,"CD",true) == 0) { result = "Contrabando de drogas"; }
                            if(strcmp(result,"RV",true) == 0) { result = "Roubo de Veнculo"; }
                            if(strcmp(result,"ACP",true) == 0) { result = "Atentado contra Prefeitura"; }
                            if(strcmp(result,"RM",true) == 0) { result = "Rejeiзгo de multa"; }
                            if(strcmp(result,"RP",true) == 0) { result = "Resistencia a prisгo"; }
                            if(strcmp(result,"ILR",true) == 0) { result = "Invasгo a Local Restrito"; }
                            if(strcmp(result,"RMD",true) == 0) { result = "Rejeiзгo a Mostrar Documentos"; }
                            if(strcmp(result,"DA",true) == 0) { result = "Desacato б Autoridade"; }
                            if(strcmp(result,"PIA",true) == 0) { result = "Porte Ilegal de Armas"; }
                            if(strcmp(result,"CF",true) == 0) { result = "Cumplice de Fugas"; }
                            if(WantedPoints[giveplayerid] == 0) { WantedPoints[giveplayerid] += 1; }
                            else{WantedPoints[giveplayerid]+= 1;}
                            SetPlayerCriminal(giveplayerid,playerid, result);
                            WantedPoints[giveplayerid] += 1;
                            TextDrawHideForPlayer(giveplayerid,tGP2[giveplayerid]);
                            TextDrawShowForPlayer(giveplayerid,tGP3[giveplayerid]);
                            return 1;
                        }
                        else
                        {
                            SendClientMessage(playerid, COLOR_GRAD2, "   Vocк nгo pode suspeitar de oficial !");
                        }
                    }
                }
                else
                {
                        format(string, sizeof(string), "   %d nгo й um player ativo.", giveplayerid);
                        SendClientMessage(playerid, COLOR_GRAD1, string);
                        return 1;
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD2, "   Vocк nгo й PM / PF / FA !");
            }
        }
        return 1;
    }

    stock IsACop(playerid)//coloca esse codigo se ele nгo existir, se ele existir atualize-o
    {
        new org = PlayerInfo[playerid][pMember];
        if(org == 1 || org == 2 || org == 3 || org == 14 || org == 21) return true;
        else return false;
    }
Reply
#3

Olha os erro que deu
PHP код:
C:\Users\Felipe\Desktop\gmusado\gamemodes\BSL.pwn(13428) : error 021symbol already defined"IsACop"
C:\Users\Felipe\Desktop\gmusado\gamemodes\BSL.pwn(34286) : warning 217loose indentation
C
:\Users\Felipe\Desktop\gmusado\gamemodes\BSL.pwn(34301) : error 075input line too long (after substitutions)
C:\Users\Felipe\Desktop\gmusado\gamemodes\BSL.pwn(34377) : warning 217loose indentation
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase


2 Errors

Reply
#4

Quote:
Originally Posted by Pharrel
pawn Код:
stock IsACop(playerid)//coloca esse codigo se ele nгo existir, se ele existir atualize-o
    {
        new org = PlayerInfo[playerid][pMember];
        if(org == 1 || org == 2 || org == 3 || org == 14 || org == 21) return true;
        else return false;
    }
lк o q ta em verde
Reply
#5

eu botei vei mesmo assim nao deu em que public eu boto isso ?
PHP код:
C:\Users\Felipe\Desktop\gmusado\gamemodes\BSL.pwn(13428) : error 021symbol already defined"IsACop"
C:\Users\Felipe\Desktop\gmusado\gamemodes\BSL.pwn(34301) : error 075input line too long (after substitutions)
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
2 Errors

Reply
#6

Pesquisa isso no seu GM
pawn Код:
public IsACop
Assim que achar, delete toda a funзгo, depois disso, adicione a que o Pharrel te passou.


Jб a linha 34601, й muito longa. Basta usar duas linhas ou mais no seu editor.
Reply
#7

ae deu serto vlw vini
Reply
#8

De nada...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)