27.04.2012, 18:39
Eu gostaria que o comando abaixo fica-se assim: O player equipa e ele ganha 50 de drogas mais as armas, e tipo ele poderia pegar drogas a cada 1 minuto. Mas esse que eu fiz bloqueia atй de pegar as armas. E tipo eu gostaria que me ajuda-sem a criar um comando que o lider libera uma nova rodada de drogas. Tipo: /liberardrogas e libera todos os da org a pegar drogas novamente sem esperar o tempo certo.
Comando:
Public:
Comando:
pawn Код:
//==============================================================================
if(strcmp(cmd, "/fodak2", true) == 0)
{
GetPlayerName(playerid, sendername, MAX_PLAYER_NAME);
if(PlayerInfo[playerid][pMembro] == 1 || PlayerInfo[playerid][pLider] == 1 ||
PlayerInfo[playerid][pMembro] == 2 || PlayerInfo[playerid][pLider] == 2 ||
PlayerInfo[playerid][pMembro] == 11 || PlayerInfo[playerid][pLider] == 11 ||
PlayerInfo[playerid][pMembro] == 16 || PlayerInfo[playerid][pLider] == 16 ||
PlayerInfo[playerid][pMembro] == 3 || PlayerInfo[playerid][pLider] == 3 ||
PlayerInfo[playerid][pMembro] == 34 || PlayerInfo[playerid][pLider] == 34)
{
if(PlayerInfo[playerid][pCargo] >= 2)
{
format(string, sizeof(string), "* Policial %s pega seus equipamentos.", PlayerName(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
ResetPlayerWeaponsEx(playerid);
SetPlayerArmour(playerid, 100.0);
SetPlayerHealth(playerid, 100.0);
GivePlayerWeapon(playerid, 25, 80);
GivePlayerWeapon(playerid, 24, 150);
GivePlayerWeapon(playerid, 3, 0);
GivePlayerWeapon(playerid, 29, 300);
GivePlayerWeapon(playerid, 31, 300);
GivePlayerWeapon(playerid, 17, 20);
GivePlayerWeapon(playerid, 41, 9999);
}
}
if(PlayerInfo[playerid][pLider] == 7 || PlayerInfo[playerid][pLider] == 30 || PlayerInfo[playerid][pMembro] == 7 || PlayerInfo[playerid][pMembro] == 30)
{
if(PlayerInfo[playerid][pCargo] >= 2)
{
format(string, sizeof(string), "* Servidor Publico %s pega seus equipamentos.", PlayerName(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
ResetPlayerWeaponsEx(playerid);
SetPlayerArmour(playerid, 100.0);
SetPlayerHealth(playerid, 100.0);
GivePlayerWeapon(playerid, 25, 80);
GivePlayerWeapon(playerid, 24, 150);
GivePlayerWeapon(playerid, 3, 0);
GivePlayerWeapon(playerid, 29, 300);
GivePlayerWeapon(playerid, 31, 300);
GivePlayerWeapon(playerid, 17, 20);
GivePlayerWeapon(playerid, 41, 9999);
}
}
if(PlayerInfo[playerid][pMembro] == 15 || PlayerInfo[playerid][pLider] == 15 || PlayerInfo[playerid][pMembro] == 6 || PlayerInfo[playerid][pLider] == 6)
{
if (usoudrogas[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, "Vocк jб pegou drogas. Aguarde um minuto");
{
if(PlayerInfo[playerid][pCargo] >= 2)
{
new org = GetPlayerOrg(playerid);
new dorgas = CofreOrg[org][Maconha];
new material = CofreOrg[org][Materiais];
CofreOrg[org][Maconha] = dorgas-50;
CofreOrg[org][Materiais] = material-50;
SetTimer("UsarDrogasHQ", 100000, 0);
usoudrogas[playerid] = 1;
SendClientMessage(playerid, COR_PCC, "A HQ lhe deu 50 de maconha");
format(string, sizeof(string), "* Terrorista %s Pegou Seu Equipamento de Terrorismo.", PlayerName(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
ResetPlayerWeaponsEx(playerid);
GivePlayerWeapon(playerid, 24, 120);
GivePlayerWeapon(playerid, 25, 140);
GivePlayerWeapon(playerid, 29, 130);
GivePlayerWeapon(playerid, 31, 250);
}
}
}
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
|| PlayerInfo[playerid][pMembro] == 21 || PlayerInfo[playerid][pLider] == 21 || PlayerInfo[playerid][pMembro] == 25 || PlayerInfo[playerid][pLider] == 25
|| PlayerInfo[playerid][pMembro] == 24 || PlayerInfo[playerid][pLider] == 24 || PlayerInfo[playerid][pMembro] == 26 || PlayerInfo[playerid][pLider] == 26
|| PlayerInfo[playerid][pMembro] == 23 || PlayerInfo[playerid][pLider] == 23 || PlayerInfo[playerid][pMembro] == 28 || PlayerInfo[playerid][pLider] == 28
|| PlayerInfo[playerid][pMembro] == 29 || PlayerInfo[playerid][pLider] == 29 || PlayerInfo[playerid][pMembro] == 31 || PlayerInfo[playerid][pLider] == 31)
{
if (usoudrogas[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, "Vocк jб pegou drogas. Aguarde um minuto");
{
if(PlayerInfo[playerid][pCargo] >= 2)
{
new org = GetPlayerOrg(playerid);
new dorgas = CofreOrg[org][Maconha];
new material = CofreOrg[org][Materiais];
CofreOrg[org][Maconha] = dorgas-50;
CofreOrg[org][Materiais] = material-50;
SetTimer("UsarDrogasHQ", 100000, 0);
usoudrogas[playerid] = 1;
ResetPlayerWeaponsEx(playerid);
GivePlayerWeapon(playerid, 24, 120);
GivePlayerWeapon(playerid, 25, 140);
GivePlayerWeapon(playerid, 29, 130);
GivePlayerWeapon(playerid, 31, 250);
SendClientMessage(playerid, COR_PCC, "A HQ lhe deu 50 de maconha");
format(string, sizeof(string), "* Gangster %s pega seus equipamentos.", PlayerName(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
}
}
if (PlayerInfo[playerid][pLider] == 12 || PlayerInfo[playerid][pMembro] == 12 || PlayerInfo[playerid][pLider] == 13 || PlayerInfo[playerid][pMembro] == 13) // Mбfia Cosa Nostra
{
if (usoudrogas[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, "Vocк jб pegou drogas. Aguarde um minuto");
{
if(PlayerInfo[playerid][pCargo] >= 2)
{
new org = GetPlayerOrg(playerid);
new dorgas = CofreOrg[org][Maconha];
new material = CofreOrg[org][Materiais];
CofreOrg[org][Maconha] = dorgas-50;
CofreOrg[org][Materiais] = material-50;
SetTimer("UsarDrogasHQ", 100000, 0);
usoudrogas[playerid] = 1;
SendClientMessage(playerid, COR_PCC, "A HQ lhe deu 50 de maconha");
format(string, sizeof(string), "* Mafioso %s pega seus equipamentos.", PlayerName(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
ResetPlayerWeaponsEx(playerid);
GivePlayerWeapon(playerid, 24, 120);
GivePlayerWeapon(playerid, 25, 140);
GivePlayerWeapon(playerid, 29, 130);
GivePlayerWeapon(playerid, 31, 250);
return true;
}
}
}
return true;
}
pawn Код:
public UsarDrogasHQ(playerid)
{
usoudrogas[playerid] = 0;
}