[Ajuda] /equiparfbi e /desiquiparfbi
#1

boas eu editei este comando a minha maneira e agora ao fazer /equiparfbi dis Voce colocou o equipamento fbi
e aparece armas e a skin agora ao fazer /desiquiparfbi nao diz "voce desiquipou o equipamneto fbi"
e nao tira as armas nem mete a skin que ele tinha antes de fazer /equiparfbi :S alguem ajuda ? vejam o comando

PHP код:
if(!strcmp(cmdtext,"/equiparfbi",true))
    {
        if(
IsACop(playerid))
        if(
PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == || PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == 2)
        {
        if (
PlayerToPoint(3playerid,255.3,77.4,1003.6) || PlayerToPoint(3,playerid,-1616.1294,681.1594,7.1875) || PlayerInfo[playerid][pLocal] != 255)
        if(
Equipamentos[playerid] == 1)
        {
            
RemovePlayerAttachedObject(playerid,3);
                    
Equipamentos[playerid] = 0;
                    return 
1;
        }
        if(
Equipamentos[playerid] == 0)
        {
            
SetPlayerAttachedObject(playerid,3,18637,13,0.35,0.0,0.0,0.0,0.0,180.0);
            
SendClientMessage(playeridCOLOR_GREEN"Vocк colocou o seu equipamento");
            new 
nomefbi[MAX_PLAYER_NAME];//Tava faltando iso aki << prap ega o nome do lokin
            
GetPlayerName(playeridnomefbisizeof(nomefbi));//<<
            
format(stringsizeof(string), "Argente FBI %s colocou o equipamento. "nomefbi);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
SetPlayerSkin(playerid285)
            
SafeGivePlayerWeapon(playerid241000);
            
SafeGivePlayerWeapon(playerid311000);
            
SafeGivePlayerWeapon(playerid351000);
            
SafeGivePlayerWeapon(playerid401000);
            
SafeGivePlayerWeapon(playerid391000);
            
SetPlayerHealth(playerid100);
            
SetPlayerArmour(playerid100);
            
TogglePlayerControllable(playerid1);
            
SetPlayerColor(playerid,0x008EFFFF);
            
printf("%s"string);
            
Equipamentos[playerid] = 1;
            return 
1;
        }
        }
        else
        {
            
SendClientMessage(playerid,COLOR_RED,"Vocк nгo й um ARGENTE FBI.");
        }
        return 
1;
    }
    
    if(!
strcmp(cmdtext,"/desiquiparfbi",true))
    {
        if(
IsACop(playerid))
        if(
PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == || PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == 2)
        {
        if (
PlayerToPoint(3playerid,255.3,77.4,1003.6) || PlayerToPoint(3,playerid,-1616.1294,681.1594,7.1875) || PlayerInfo[playerid][pLocal] != 255)
        if(
Equipamentos[playerid] == 1)
        {
            
RemovePlayerAttachedObject(playerid,3);
                    
Equipamentos[playerid] = 0;
                    return 
1;
        }
        if(
Equipamentos[playerid] == 1)
        {
            
RemovePlayerAttachedObject(playerid,3);
            
SendClientMessage(playeridCOLOR_GREEN"Vocк guardou o seu equipamento.");
            new 
nomefbi[MAX_PLAYER_NAME];//Tava faltando iso aki << prap ega o nome do lokin
            
GetPlayerName(playeridnomefbisizeof(nomefbi));//<<
            
format(stringsizeof(string), "Argente FBI %s guardou o equipamento. "nomefbi);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
SafeResetPlayerWeapons(playerid);
            
SetPlayerSkin(playeridPlayerInfo[playerid][pChar]);
            
SetPlayerHealth(playerid100);
            
SetPlayerArmour(playerid0);
            
SetPlayerColor(playerid,0xFFFFFFAA);
            
TogglePlayerControllable(playerid1);
            
printf("%s"string);
            
Equipamentos[playerid] = 0;
            return 
1;
        }
        }
        else
        {
            
SendClientMessage(playerid,COLOR_RED,"Vocк nгo й um ARGENTE FBI.");
        }
        return 
0;
    } 
Reply
#2

pawn Код:
if(!strcmp(cmdtext,"/desiquiparfbi",true))
{
    if(IsACop(playerid))
    if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 2)  return SendClientMessage(playerid,COLOR_RED,"Vocк nгo й um ARGENTE FBI.");
    if (PlayerToPoint(3, playerid,255.3,77.4,1003.6) || PlayerToPoint(3,playerid,-1616.1294,681.1594,7.1875) || PlayerInfo[playerid][pLocal] != 255)
    if(Equipamentos[playerid] == 1)
    {
          RemovePlayerAttachedObject(playerid,3);
          SendClientMessage(playerid, COLOR_GREEN, "Vocк guardou o seu equipamento.");
          new nomefbi[MAX_PLAYER_NAME];//Tava faltando iso aki << prap ega o nome do lokin
          GetPlayerName(playerid, nomefbi, sizeof(nomefbi));//<<
          format(string, sizeof(string), "Argente FBI %s guardou o equipamento. ", nomefbi);
          ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
          SafeResetPlayerWeapons(playerid);
          SetPlayerSkin(playerid, PlayerInfo[playerid][pChar]);
          SetPlayerHealth(playerid, 100);
          SetPlayerArmour(playerid, 0);
          SetPlayerColor(playerid,0xFFFFFFAA);
          TogglePlayerControllable(playerid, 1);
          printf("%s", string);
          Equipamentos[playerid] = 0;
          return true;
    }
    return false;
}
Reply
#3

faзo /equiparfbi e da direito e agora ao fazer /desiquiparfbi dis que nao sou do FBI
Reply
#4

Voз estб colocando muito if na mesma linha, assim vira zona..
Tente assim, talvez atй voз ache o erro:
pawn Код:
if()
{
    if()
    {
          if()
          {
          }
    }
}
Reply
#5

й = dis que nao sou do FBI
Reply
#6

Desculpem duble post nao deu pa editar.. :S alguem me pode ajudar ai ? agradeзo muito
Reply
#7

pawn Код:
if(!strcmp(cmdtext,"/desiquiparfbi",true))
{
    if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)  return SendClientMessage(playerid,COLOR_RED,"Vocк nгo й um ARGENTE FBI.");
    if (PlayerToPoint(3, playerid,255.3,77.4,1003.6) || PlayerToPoint(3,playerid,-1616.1294,681.1594,7.1875) || PlayerInfo[playerid][pLocal] != 255) return SendClientMessage(playerid,COLOR_RED,"Vocк nгo Estб No Local.");
    if(Equipamentos[playerid] == 1)
    {
          RemovePlayerAttachedObject(playerid,3);
          SendClientMessage(playerid, COLOR_GREEN, "Vocк guardou o seu equipamento.");
          new nomefbi[MAX_PLAYER_NAME];//Tava faltando iso aki << prap ega o nome do lokin
          GetPlayerName(playerid, nomefbi, sizeof(nomefbi));//<<
          format(string, sizeof(string), "Argente FBI %s guardou o equipamento. ", nomefbi);
          ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
          SafeResetPlayerWeapons(playerid);
          SetPlayerSkin(playerid, PlayerInfo[playerid][pChar]);
          SetPlayerHealth(playerid, 100);
          SetPlayerArmour(playerid, 0);
          SetPlayerColor(playerid,0xFFFFFFAA);
          TogglePlayerControllable(playerid, 1);
          printf("%s", string);
          Equipamentos[playerid] = 0;
          return true;
    }
    return false;
}
Reply
#8

e a mesma coisa diz que nao sou do FBI :S alguma coisa ta a correr mal
Reply
#9

Isto deve resolver o seu problema .


Qualquer problema, verifique se o ID do FBI estб colocado em um dos ifs mesmo .


pawn Код:
if(!strcmp(cmdtext,"/equiparfbi",true))
    {
        if(IsACop(playerid) || PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 2)
        {
            if (PlayerToPoint(3, playerid,255.3,77.4,1003.6) || PlayerToPoint(3,playerid,-1616.1294,681.1594,7.1875) || PlayerInfo[playerid][pLocal] != 255)
            {
                if(Equipamentos[playerid] == 1)
                {
                    RemovePlayerAttachedObject(playerid,3);
                    Equipamentos[playerid] = 0;
                }
                else if(Equipamentos[playerid] == 0)
                {
                    SetPlayerAttachedObject(playerid,3,18637,13,0.35,0.0,0.0,0.0,0.0,180.0);
                    SendClientMessage(playerid, COLOR_GREEN, "Vocк colocou o seu equipamento");
                    new nomefbi[MAX_PLAYER_NAME];//Tava faltando iso aki << prap ega o nome do lokin
                    GetPlayerName(playerid, nomefbi, sizeof(nomefbi));//<<
                    format(string, sizeof(string), "Argente FBI %s colocou o equipamento. ", nomefbi);
                    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                    SetPlayerSkin(playerid, 285)
                    SafeGivePlayerWeapon(playerid, 24, 1000);
                    SafeGivePlayerWeapon(playerid, 31, 1000);
                    SafeGivePlayerWeapon(playerid, 35, 1000);
                    SafeGivePlayerWeapon(playerid, 40, 1000);
                    SafeGivePlayerWeapon(playerid, 39, 1000);
                    SetPlayerHealth(playerid, 100);
                    SetPlayerArmour(playerid, 100);
                    TogglePlayerControllable(playerid, 1);
                    SetPlayerColor(playerid,0x008EFFFF);
                    printf("%s", string);
                    Equipamentos[playerid] = 1;
                }
            }
        }
        else
        {
            SendClientMessage(playerid,COLOR_RED,"Vocк nгo й um ARGENTE FBI.");
        }
        return true;
    }



    if(!strcmp(cmdtext,"/desiquiparfbi",true))
    {
        if(IsACop(playerid) || PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 2)
        {
            if (PlayerToPoint(3, playerid,255.3,77.4,1003.6) || PlayerToPoint(3,playerid,-1616.1294,681.1594,7.1875) || PlayerInfo[playerid][pLocal] != 255)
            {
                if(Equipamentos[playerid] == 1)
                {
                    RemovePlayerAttachedObject(playerid,3);
                    Equipamentos[playerid] = 0;
                }
                else if(Equipamentos[playerid] == 1)
                {
                    RemovePlayerAttachedObject(playerid,3);
                    SendClientMessage(playerid, COLOR_GREEN, "Vocк guardou o seu equipamento.");
                    new nomefbi[MAX_PLAYER_NAME];//Tava faltando iso aki << prap ega o nome do lokin
                    GetPlayerName(playerid, nomefbi, sizeof(nomefbi));//<<
                    format(string, sizeof(string), "Argente FBI %s guardou o equipamento. ", nomefbi);
                    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                    SafeResetPlayerWeapons(playerid);
                    SetPlayerSkin(playerid, PlayerInfo[playerid][pChar]);
                    SetPlayerHealth(playerid, 100);
                    SetPlayerArmour(playerid, 0);
                    SetPlayerColor(playerid,0xFFFFFFAA);
                    TogglePlayerControllable(playerid, 1);
                    printf("%s", string);
                    Equipamentos[playerid] = 0;
                }
            }
        }
        else
        {
            SendClientMessage(playerid,COLOR_RED,"Vocк nгo й um ARGENTE FBI.");
        }
        return true;
    }

Espero ter ajudado .
Reply
#10

SetPlayerSkin(playerid, 285);

;;;;;;
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)