03.05.2015, 06:56
Galera estou adicionando um efeito, no carro. Como faзo para proibir que o mesmo efeito seja colocado 2 vezes? porque se colocam ele 2 vezes, ele buga e nгo remove !!! Olha o code !!!
pawn Код:
public OnPlayerSelectedMenuRow(playerid, row)
{
new Menu: Current = GetPlayerMenu(playerid);
if (Current == outrosmenu)
{
switch (row)
{
case 0:
ShowMenuForPlayer(outrosmenu, playerid);
}
}
if (Current == outrosmenu)
{
switch(row)
{
case 0: // Outros
{ // Mini
TogglePlayerControllable(playerid, true);
SetPVarInt( playerid, "minigun", 1 );
SetPVarInt( playerid, "minigun", CreateObject( 362,0,0,0,0,0,0 ));
SetPVarInt( playerid, "minigun2", CreateObject( 362,0,0,0,0,0,0 ));
AttachObjectToVehicle( GetPVarInt( playerid, "minigun" ), GetPlayerVehicleID( playerid ), -1.200000,0.075000,0.150000,-2.700001,27.000005,-264.599853 );
AttachObjectToVehicle( GetPVarInt( playerid, "minigun2" ), GetPlayerVehicleID( playerid ), 1.274999,0.075000,0.150000,-2.700001,27.000005,-264.599853 );
SendClientMessage( playerid, 0xFFFFFFAA, "Minigun de enfeite Instalada" );
}