SA-MP Forums Archive
[Pedido] CMD - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Pedido] CMD (/showthread.php?tid=296477)



[Pedido] CMD - Laercio - 11.11.2011

Bom Gostaria que cria-se um cmd chamado
/kitterrorista

Com as seguintes armas :

pawn Код:
//
            GivePlayerWeapon(playerid, 24, 2500);
            GivePlayerWeapon(playerid, 31, 2500);
            GivePlayerWeapon(playerid, 29, 2500);
            GivePlayerWeapon(playerid, 25, 2500);
            GivePlayerWeapon(playerid, 4, 1);
            GivePlayerWeapon(playerid, 1, 1);
            GivePlayerWeapon(playerid, 34, 2500);
            GivePlayerWeapon(playerid, 16, 10);
            GivePlayerWeapon(playerid, 40, 2500);
            GivePlayerWeapon(playerid, 27, 50);
A Variavel dos terrorista й
if(gTeam[playerid] == TEAM_T)
Tabem , Queria pros cop tbm com o nome /kitpolicia
A Variavel dele й a seguinte :
if(gTeam[playerid] == TEAM_CT)

Com as mesmas armas , please nгo seja em ZMD , melhor normal mesmo tipo assim : if(strcmp("/kitpolicia", cmdtext, true, 10) == 0)


Re: [Ajuda][Pedido] CMD - ViniBorn - 11.11.2011

pawn Код:
if(!strcmp("/kit", cmdtext))
{
    if(gTeam[playerid] != TEAM_T && gTeam[playerid] != TEAM_CT)
        return SendClientMessage(playerid,-1,"Vocк nгo pode usar este comando.");

    if(gTeam[playerid] == TEAM_T)
        SendClientMessage(playerid,-1,"Vocк pegou seu Kit Terrorista");
    else
        SendClientMessage(playerid,-1,"Vocк pegou seu Kit Policial");

    GivePlayerWeapon(playerid, 24, 2500);
    GivePlayerWeapon(playerid, 31, 2500);
    GivePlayerWeapon(playerid, 29, 2500);
    GivePlayerWeapon(playerid, 25, 2500);
    GivePlayerWeapon(playerid, 4, 1);
    GivePlayerWeapon(playerid, 1, 1);
    GivePlayerWeapon(playerid, 34, 2500);
    GivePlayerWeapon(playerid, 16, 10);
    GivePlayerWeapon(playerid, 40, 2500);
    GivePlayerWeapon(playerid, 27, 50);

    return 1;
}



Re: [Ajuda][Pedido] CMD - Kuddy - 11.11.2011

Isso?
pawn Код:
// Code
    if(!strcmp("/comando", cmd, true))
    {
        if(gTeam[playerid] == TEAM_T)
        {

            GivePlayerWeapon(playerid, 24, 2500);
            GivePlayerWeapon(playerid, 31, 2500);
            GivePlayerWeapon(playerid, 29, 2500);
            GivePlayerWeapon(playerid, 25, 2500);
            GivePlayerWeapon(playerid, 4, 1);
            GivePlayerWeapon(playerid, 1, 1);
            GivePlayerWeapon(playerid, 34, 2500);
            GivePlayerWeapon(playerid, 16, 10);
            GivePlayerWeapon(playerid, 40, 2500);
            GivePlayerWeapon(playerid, 27, 50);
        }
        return 1;
    }



Re: [Ajuda][Pedido] CMD - Laercio - 11.11.2011

Quote:
Originally Posted by Viniborn
Посмотреть сообщение
pawn Код:
if(!strcmp("/kit", cmdtext))
{
GivePlayerWeapon(playerid, 24, 2500);
GivePlayerWeapon(playerid, 31, 2500);
GivePlayerWeapon(playerid, 29, 2500);
GivePlayerWeapon(playerid, 25, 2500);
GivePlayerWeapon(playerid, 4, 1);
GivePlayerWeapon(playerid, 1, 1);
GivePlayerWeapon(playerid, 34, 2500);
GivePlayerWeapon(playerid, 16, 10);
GivePlayerWeapon(playerid, 40, 2500);
GivePlayerWeapon(playerid, 27, 50);
return 1;
}
to com duvida em como por a variavel '-'


Re: [Ajuda][Pedido] CMD - Agent_Hitman - 11.11.2011

muito facil so fazer o que amigo acima disse que da certo


Re: [Ajuda][Pedido] CMD - Pharrel - 11.11.2011

Quote:
Originally Posted by dMagnus
Посмотреть сообщение
Isso?
pawn Код:
// Code
    if(!strcmp("/comando", cmd, true))
    {
        if(gTeam[playerid] == TEAM_T)
        {

            GivePlayerWeapon(playerid, 24, 2500);
            GivePlayerWeapon(playerid, 31, 2500);
            GivePlayerWeapon(playerid, 29, 2500);
            GivePlayerWeapon(playerid, 25, 2500);
            GivePlayerWeapon(playerid, 4, 1);
            GivePlayerWeapon(playerid, 1, 1);
            GivePlayerWeapon(playerid, 34, 2500);
            GivePlayerWeapon(playerid, 16, 10);
            GivePlayerWeapon(playerid, 40, 2500);
            GivePlayerWeapon(playerid, 27, 50);
        }
        return 1;
    }
... й bom prestar atenзгo de vez em quando


Re: [Ajuda][Pedido] CMD - ViniBorn - 11.11.2011

Editei meu post lб emcima. Dб uma olhada.


Re: [Ajuda][Pedido] CMD - [PSN]Andre_Simpson - 11.11.2011

TERRORISTA:

pawn Код:
}
    if(strcmp(cmd, "/kitterrorista", true) == 0)
    {
        if(IsPlayerConnected(playerid);
        }
          if(gTeam[playerid] == TEAM_T)
          {
            GivePlayerWeapon(playerid, 24, 2500);
            GivePlayerWeapon(playerid, 31, 2500);
            GivePlayerWeapon(playerid, 29, 2500);
            GivePlayerWeapon(playerid, 25, 2500);
            GivePlayerWeapon(playerid, 4, 1);
            GivePlayerWeapon(playerid, 1, 1);
            GivePlayerWeapon(playerid, 34, 2500);
            GivePlayerWeapon(playerid, 16, 10);
            GivePlayerWeapon(playerid, 40, 2500);
            GivePlayerWeapon(playerid, 27, 50);
            SendClientMessage(playerid,COLOR_GREEN,"Vocк pegou seu Kit terrorista");
        }
        return 1;
Policia:

pawn Код:
}
    if(strcmp(cmd, "/kitpolicia", true) == 0)
    {
        if(IsPlayerConnected(playerid);
        }
          if(gTeam[playerid] == TEAM_CT)
          {
            GivePlayerWeapon(playerid, 24, 2500);
            GivePlayerWeapon(playerid, 31, 2500);
            GivePlayerWeapon(playerid, 29, 2500);
            GivePlayerWeapon(playerid, 25, 2500);
            GivePlayerWeapon(playerid, 4, 1);
            GivePlayerWeapon(playerid, 1, 1);
            GivePlayerWeapon(playerid, 34, 2500);
            GivePlayerWeapon(playerid, 16, 10);
            GivePlayerWeapon(playerid, 40, 2500);
            GivePlayerWeapon(playerid, 27, 50);
            SendClientMessage(playerid,COLOR_GREEN,"Vocк pegou seu Kit Policial");
        }
        return 1;



ajudei ? +REP


Re: [Ajuda][Pedido] CMD - Laercio - 11.11.2011

Quote:
Originally Posted by dMagnus
Посмотреть сообщение
Isso?
Sim Brigadгo (:


Re: [Ajuda][Pedido] CMD - Kuddy - 11.11.2011

Quote:
Originally Posted by [PSN]Andre_Simpson
Посмотреть сообщение
TERRORISTA:

pawn Код:
}
    if(strcmp(cmd, "/kitterrorista", true) == 0)
    {
        if(IsPlayerConnected(playerid);
        }
          if(gTeam[playerid] == TEAM_T)
          {
            GivePlayerWeapon(playerid, 24, 2500);
            GivePlayerWeapon(playerid, 31, 2500);
            GivePlayerWeapon(playerid, 29, 2500);
            GivePlayerWeapon(playerid, 25, 2500);
            GivePlayerWeapon(playerid, 4, 1);
            GivePlayerWeapon(playerid, 1, 1);
            GivePlayerWeapon(playerid, 34, 2500);
            GivePlayerWeapon(playerid, 16, 10);
            GivePlayerWeapon(playerid, 40, 2500);
            GivePlayerWeapon(playerid, 27, 50);
            SendClientMessage(playerid,COLOR_GREEN,"Vocк pegou seu Kit terrorista");
        }
        return 1;
Policia:

pawn Код:
}
    if(strcmp(cmd, "/kitpolicia", true) == 0)
    {
        if(IsPlayerConnected(playerid);
        }
          if(gTeam[playerid] == TEAM_CT)
          {
            GivePlayerWeapon(playerid, 24, 2500);
            GivePlayerWeapon(playerid, 31, 2500);
            GivePlayerWeapon(playerid, 29, 2500);
            GivePlayerWeapon(playerid, 25, 2500);
            GivePlayerWeapon(playerid, 4, 1);
            GivePlayerWeapon(playerid, 1, 1);
            GivePlayerWeapon(playerid, 34, 2500);
            GivePlayerWeapon(playerid, 16, 10);
            GivePlayerWeapon(playerid, 40, 2500);
            GivePlayerWeapon(playerid, 27, 50);
            SendClientMessage(playerid,COLOR_GREEN,"Vocк pegou seu Kit Policial");
        }
        return 1;



ajudei ? +REP
Pra que responder um code totalmente bugado se ele ja foi solucionado? ¬¬