[Pedido] CMD
#1

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)
Reply
#2

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;
}
Reply
#3

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;
    }
Reply
#4

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 '-'
Reply
#5

muito facil so fazer o que amigo acima disse que da certo
Reply
#6

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
Reply
#7

Editei meu post lб emcima. Dб uma olhada.
Reply
#8

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
Reply
#9

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

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? ¬¬
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)