[FilterScript] Air Bomb
#3

тtima idйia, mais nгo deveria checar se estб em um veнculo antes de criar as variбveis ?

pawn Code:
CMD:fire(playerid){

    if(IsPlayerInAnyVehicle(playerid)){
       new Float:X,Float:Y,Float:Z,Float:A, car = GetPlayerVehicleID(playerid),model = GetVehicleModel(car);
        if(ammo[car] == 0) return SendClientMessage(playerid,-1,"sem muniзгo, use /ammo");
        if(model != 553) return 1;
        GetPlayerPos(playerid,X,Y,Z);
        GetVehicleZAngle(GetPlayerVehicleID(playerid),A);
        bomb[playerid] = CreateObject(345,X,Y,Z,A,0,0,0.0);
       
        MapAndreas_FindZ_For2DCoord(X,Y,Z);
        MoveObject(bomb[playerid],X,Y,Z,100.0,A,0.0,0.0);
        CreateExplosion(X,Y,Z,10,20.0);
        ammo[car] --;
        DestroyObject(bomb[playerid]);
    }
    return 1;
}
Reply


Messages In This Thread
Air Bomb - by RebeloX - 18.04.2012, 17:55
Re: Air Bomb - by dPlaYer_ - 18.04.2012, 17:57
Re: Air Bomb - by zSuYaNw - 18.04.2012, 17:58
Re: Air Bomb - by paulor - 18.04.2012, 17:59
Re: Air Bomb - by RebeloX - 18.04.2012, 18:05
Respuesta: Air Bomb - by [NVC]iTrevaS - 18.04.2012, 18:07
Re: Air Bomb - by zSuYaNw - 18.04.2012, 18:08
Re: Air Bomb - by ViniBorn - 18.04.2012, 18:40
Re: Air Bomb - by RebeloX - 18.04.2012, 19:31
Re: Air Bomb - by StrondA_ - 18.04.2012, 20:12

Forum Jump:


Users browsing this thread: 1 Guest(s)