if(listitem == 3)
{
ResetPlayerWeaponsEx(playerid);
SetPlayerAttachedObject(playerid,1,19142,1,0.1,0.05,0.0,0.0,0.0,0.0);
SetPlayerAttachedObject(playerid,2,19141,2,0.11,0.0,0.0,0.0,0.0,0.0);
SetPlayerAttachedObject(playerid,3,18637,13,0.35,0.0,0.0,0.0,0.0,180.0);
GivePlayerWeapon(playerid, 33, 10);
SendClientMessage(playerid,COLOR_RED,"Vocк equipou sua arma de shock !");
SendClientMessage(playerid,COLOR_RED,"Obs: Sу use no procurado se ele tentar fugir, caso contrбrio vocк serб punido !");
TogglePlayerControllable(playerid, 1);
}
if(listitem == 2)
{
if(GetPlayerOrg(playerid) == 1)
{
if(OnDuty[playerid] != 1)
{
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo Bateu o cartгo!");
return 1;
}
if(rocamativado[playerid] == 0)
{
skinrocam[playerid] = GetPlayerSkin(playerid);
SetPlayerSkin(playerid, 284);
JogadorInfo[playerid][pSkin] = 284;
SendClientMessage(playerid, COLOR_RED, "Vocк ativou o modo ROCAM !");
rocamativado[playerid] = 1;
}
else if(rocamativado[playerid] == 1)
{
SetPlayerSkin(playerid, skinrocam[playerid]);
JogadorInfo[playerid][pSkin] = skinrocam[playerid];
SendClientMessage(playerid, COLOR_RED, "Vocк desativou o modo ROCAM !");
rocamativado[playerid] = 0;
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "Vocк nгo й da Policia Militar !");
return 1;
}
}
new ArmaShock[MAX_PLAYERS]
if(listitem == 3) { if(ArmaShock[playerid] == false) { ResetPlayerWeaponsEx(playerid); SetPlayerAttachedObject(playerid,1,19142,1,0.1,0.05,0.0,0.0,0.0,0.0); SetPlayerAttachedObject(playerid,2,19141,2,0.11,0.0,0.0,0.0,0.0,0.0); SetPlayerAttachedObject(playerid,3,18637,13,0.35,0.0,0.0,0.0,0.0,180.0); GivePlayerWeapon(playerid, 33, 10); SendClientMessage(playerid,COLOR_RED,"Vocк equipou sua arma de shock !"); SendClientMessage(playerid,COLOR_RED,"Obs: Sу use no procurado se ele tentar fugir, caso contrбrio vocк serб punido !"); TogglePlayerControllable(playerid, 1); ArmaShock[playerid] == true; } else { //Aqui vocк coloca as funзхes que vгo ocorrer se ele jб tiver com a arma de shock, ou seja, aqui vocк desativa a arma de shock pra ele ArmaShock[playerid] == false; } }
new shockativado[MAX_PLAYERS]; // inicio do GM junto as variaveis
if(listitem == 3)
{
if(shockativado[playerid] == 0)
{
ResetPlayerWeaponsEx(playerid);
SetPlayerAttachedObject(playerid,1,19142,1,0.1,0.05,0.0,0.0,0.0,0.0);
SetPlayerAttachedObject(playerid,2,19141,2,0.11,0.0,0.0,0.0,0.0,0.0);
SetPlayerAttachedObject(playerid,3,18637,13,0.35,0.0,0.0,0.0,0.0,180.0);
GivePlayerWeapon(playerid, 33, 10);
SendClientMessage(playerid,COLOR_RED,"Vocк equipou sua arma de shock !");
SendClientMessage(playerid,COLOR_RED,"Obs: Sу use no procurado se ele tentar fugir, caso contrбrio vocк serб punido !");
TogglePlayerControllable(playerid, 1);
shockativado[playerid] = 1;
} else {
ResetPlayerWeaponsEx(playerid);
RemovePlayerAttachedObject(playerid, 1);
RemovePlayerAttachedObject(playerid, 2);
RemovePlayerAttachedObject(playerid, 3);
shockativado[playerid] = 0;
}
}
Й simples amigo, vou tentar te ajudar, no topo da GM vocк adciona:
Код:
new ArmaShock[MAX_PLAYERS] |
new bool:ArmaShock[MAX_PLAYERS];
C:\Users\Usuario\Desktop\gm\gamemodes\BPF.pwn(5371) : warning 215: expression has no effect
C:\Users\Usuario\Desktop\gm\gamemodes\BPF.pwn(5380) : warning 215: expression has no effect
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Warnings.
if(listitem == 3)
{
if(ArmaShock[playerid] == false)
{
ResetPlayerWeaponsEx(playerid);
SetPlayerAttachedObject(playerid,1,19142,1,0.1,0.05,0.0,0.0,0.0,0.0);
SetPlayerAttachedObject(playerid,2,19141,2,0.11,0.0,0.0,0.0,0.0,0.0);
SetPlayerAttachedObject(playerid,3,18637,13,0.35,0.0,0.0,0.0,0.0,180.0);
GivePlayerWeapon(playerid, 33, 10);
SendClientMessage(playerid,COLOR_RED,"Vocк equipou sua arma de shock !");
SendClientMessage(playerid,COLOR_RED,"Obs: Sу use no procurado se ele tentar fugir, caso contrбrio vocк serб punido !");
TogglePlayerControllable(playerid, 1);
ArmaShock[playerid] == true;
}
else
{
ResetPlayerWeaponsEx(playerid);
RemovePlayerAttachedObject(playerid, 1);
RemovePlayerAttachedObject(playerid, 2);
RemovePlayerAttachedObject(playerid, 3);
SendClientMessage(playerid,COLOR_RED,"Vocк Desequipou sua arma de shock !");
ArmaShock[playerid] == false;
}
}
if(listitem == 3)
{
if(ArmaShock[playerid] == false)
{
ResetPlayerWeaponsEx(playerid);
SetPlayerAttachedObject(playerid,1,19142,1,0.1,0.05,0.0,0.0,0.0,0.0);
SetPlayerAttachedObject(playerid,2,19141,2,0.11,0.0,0.0,0.0,0.0,0.0);
SetPlayerAttachedObject(playerid,3,18637,13,0.35,0.0,0.0,0.0,0.0,180.0);
GivePlayerWeapon(playerid, 33, 10);
SendClientMessage(playerid,COLOR_RED,"Vocк equipou sua arma de shock !");
SendClientMessage(playerid,COLOR_RED,"Obs: Sу use no procurado se ele tentar fugir, caso contrбrio vocк serб punido !");
TogglePlayerControllable(playerid, 1);
ArmaShock[playerid] = true;
}
else
{
ResetPlayerWeaponsEx(playerid);
RemovePlayerAttachedObject(playerid, 1);
RemovePlayerAttachedObject(playerid, 2);
RemovePlayerAttachedObject(playerid, 3);
SendClientMessage(playerid,COLOR_RED,"Vocк Desequipou sua arma de shock !");
ArmaShock[playerid] = false;
}
}