18.04.2012, 22:49
o sistema de drogas estб configurado para somente quem tiver a profissгo de traficante, eu gostaria de remover essa profissгo e colocar o sistema de drogas apenas para gangues, alguem sabe como?
Forma 1 :
if(PlayerInfo[playerid][Traficante] >= 1)
{
//Funзхes
}
ou
Forma 2:
if(Traficante[playerid] >= 1)
{
//Funзхes
}
Forma 1:
if(PlayerInfo[playerid][NOMEDAGANG] >= 1)
{
//Funзхes
}
ou
Forma 2:
if(NOMEGANG[playerid] >= 1)
{
//Funзхes
}
if(strcmp(cmd, "/vendercrack", true) == 0) { if(PlayerInfo[playerid][pJailed] != 0) { SendClientMessage(playerid,COLOR_YELLOW," Vocк nгo pode vender drogas na cadeia!"); return 1; } if(IsPlayerConnected(playerid)) { if(GetPlayerOrg(playerid) == 5 || GetPlayerOrg(playerid) == 5 || GetPlayerOrg(playerid) == 14 || GetPlayerOrg(playerid) == 14 || GetPlayerOrg(playerid) == 17 || GetPlayerOrg(playerid) == 17 || GetPlayerOrg(playerid) == 18 || GetPlayerOrg(playerid) == 18 || GetPlayerOrg(playerid) == 19 || GetPlayerOrg(playerid) == 19 || GetPlayerOrg(playerid) == 20 || GetPlayerOrg(playerid) == 20) { SendClientMessage(playerid, COLOR_GREY, " Vocк nгo й Vendedor De Drogas!"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USE: /venderdrogas [id] [quantidade] [preco]"); return 1; } new playa; new money; new needed; playa = ReturnUser(tmp); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { return 1; } needed = strval(tmp); if(needed < 1 || needed > 99) { SendClientMessage(playerid, COLOR_GREY, " Minimo de Pedras 1, e Maximo de Pedras 99!"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { return 1; } money = strval(tmp); if(money < 1 || money > 99999) { SendClientMessage(playerid, COLOR_GREY, " Preзo maior que 1, menor que 99999!"); return 1; } if(needed > PlayerInfo[playerid][pDrogas3]) { SendClientMessage(playerid, COLOR_GREY, " Vocк nao tem esta quantidade de crack com Vocк !"); return 1; } if(IsPlayerConnected(playa)) { if(playa != INVALID_PLAYER_ID) { if (ProxDetectorS(8.0, playerid, playa)) { if(playa == playerid) { SendClientMessage(playerid, COLOR_GREY, " Vocк nгo pode vender maconha pra vocк mesmo!"); return 1; } GetPlayerName(playa, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* Vocк ofereceu %s com %d pedras por R$%d .", giveplayer, needed, money); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* O Traficante %s quer vender %d pedras por R$%d, (Digite /aceitar crack) para comprar.", sendername, needed, money); SendClientMessage(playa, COLOR_LIGHTBLUE, string); DrugOffer[playa] = playerid; DrugPrice[playa] = money; DrugGram[playa] = needed; } else { SendClientMessage(playerid, COLOR_GREY, " O Jogador nгo estб perto de vocк !"); } } } else { SendClientMessage(playerid, COLOR_GREY, " Jogador offline."); } } return 1; }
if(GetPlayerOrg(playerid) == 5 || GetPlayerOrg(playerid) == 5 || GetPlayerOrg(playerid) == 14 || GetPlayerOrg(playerid) == 14 || GetPlayerOrg(playerid) == 17 || GetPlayerOrg(playerid) == 17 || GetPlayerOrg(playerid) == 18 || GetPlayerOrg(playerid) == 18 || GetPlayerOrg(playerid) == 19 || GetPlayerOrg(playerid) == 19 || GetPlayerOrg(playerid) == 20 || GetPlayerOrg(playerid) == 20)
if(PlayerInfo[playerid][pMembro] == 5 || PlayerInfo[playerid][pLider] == 5 || PlayerInfo[playerid][pMembro] == 14 || PlayerInfo[playerid][pLider] == 14 || PlayerInfo[playerid][pMembro] == 17 || PlayerInfo[playerid][pLider] == 17 || PlayerInfo[playerid][pMembro] == 18 || PlayerInfo[playerid][pLider] == 18 || PlayerInfo[playerid][pMembro] == 19 || PlayerInfo[playerid][pLider] == 19 || PlayerInfo[playerid][pMembro] == 20 || PlayerInfo[playerid][pLider] == 20)
if(strcmp(cmd, "/vendercrack", true) == 0)
{
if(PlayerInfo[playerid][pMembro] >= 5)
{
if(PlayerInfo[playerid][pJailed] != 0)
{
SendClientMessage(playerid,COLOR_YELLOW," Vocк nгo pode vender drogas na cadeia!");
return 1;
}
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMembro] >= 0)
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo й De Gang");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /venderdrogas [id] [quantidade] [preco]");
return 1;
}
new playa;
new money;
new needed;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) { return 1; }
needed = strval(tmp);
if(needed < 1 || needed > 99) { SendClientMessage(playerid, COLOR_GREY, " Minimo de Pedras 1, e Maximo de Pedras 99!"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) { return 1; }
money = strval(tmp);
if(money < 1 || money > 99999) { SendClientMessage(playerid, COLOR_GREY, " Preзo maior que 1, menor que 99999!"); return 1; }
if(needed > PlayerInfo[playerid][pDrogas3]) { SendClientMessage(playerid, COLOR_GREY, " Vocк nao tem esta quantidade de crack com Vocк !"); return 1; }
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
if (ProxDetectorS(8.0, playerid, playa))
{
if(playa == playerid)
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo pode vender maconha pra vocк mesmo!");
return 1;
}
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* Vocк ofereceu %s com %d pedras por R$%d .", giveplayer, needed, money);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* O Traficante %s quer vender %d pedras por R$%d, (Digite /aceitar crack) para comprar.", sendername, needed, money);
SendClientMessage(playa, COLOR_LIGHTBLUE, string);
DrugOffer[playa] = playerid;
DrugPrice[playa] = money;
DrugGram[playa] = needed;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " O Jogador nгo estб perto de vocк !");
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Jogador offline.");
}
}
}
return 1;
}
pawn Код:
|
if(PlayerInfo[playerid][pJailed] != 0)
{
SendClientMessage(playerid,COLOR_YELLOW," Vocк nгo pode vender drogas na cadeia!");
return 1;
}
if(IsPlayerConnected(playerid))
{
if(!(GetPlayerOrg(playerid) == 5 || GetPlayerOrg(playerid) == 5 || GetPlayerOrg(playerid) == 14 || GetPlayerOrg(playerid) == 14 || GetPlayerOrg(playerid) == 17 || GetPlayerOrg(playerid) == 17 || GetPlayerOrg(playerid) == 18 || GetPlayerOrg(playerid) == 18 || GetPlayerOrg(playerid) == 19 || GetPlayerOrg(playerid) == 19 || GetPlayerOrg(playerid) == 20 || GetPlayerOrg(playerid) == 20))
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo й Vendedor De Drogas!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /venderdrogas [id] [quantidade] [preco]");
return 1;
}
new playa;
new money;
new needed;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) { return 1; }
needed = strval(tmp);
if(needed < 1 || needed > 99) { SendClientMessage(playerid, COLOR_GREY, " Minimo de Pedras 1, e Maximo de Pedras 99!"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) { return 1; }
money = strval(tmp);
if(money < 1 || money > 99999) { SendClientMessage(playerid, COLOR_GREY, " Preзo maior que 1, menor que 99999!"); return 1; }
if(needed > PlayerInfo[playerid][pDrogas3]) { SendClientMessage(playerid, COLOR_GREY, " Vocк nao tem esta quantidade de crack com Vocк !"); return 1; }
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
if (ProxDetectorS(8.0, playerid, playa))
{
if(playa == playerid)
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo pode vender maconha pra vocк mesmo!");
return 1;
}
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* Vocк ofereceu %s com %d pedras por R$%d .", giveplayer, needed, money);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* O Traficante %s quer vender %d pedras por R$%d, (Digite /aceitar crack) para comprar.", sendername, needed, money);
SendClientMessage(playa, COLOR_LIGHTBLUE, string);
DrugOffer[playa] = playerid;
DrugPrice[playa] = money;
DrugGram[playa] = needed;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " O Jogador nгo estб perto de vocк !");
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Jogador offline.");
}
}
return 1;
}