29.02.2012, 02:34
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid)
{
for(new i = 0, weapons[13], ammo; i < 13; i++)
{
GetPlayerWeaponData(playerid, i, weapons[i], ammo);
}
if(weapons[2] == 24)
{
if(weapons[4]) return SetTimerEx("AjustarArma", 3000, 0, "d", playerid, 4);//Sub-metralhadora
if(weapons[5]) return SetTimerEx("AjustarArma", 3000, 0, "d", playerid, 5);//Metralhadora
if(weapons[6]) return SetTimerEx("AjustarArma", 3000, 0, "d", playerid, 6);//Snipers
if(weapons[7]) return SetTimerEx("AjustarArma", 3000, 0, "d", playerid, 7);//Minigun
return SetTimerEx("AjustarArma", 3000, 0, "d", playerid, 0);
}
return 1;
}
forward AjustarArma(jogador, arma);
public AjustarArma(jogador, arma) return SetPlayerArmedWeapon(jogador, arma);