Fireman job help
#6

tested, it works

PHP код:
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys){
    
    if(
HOLDING(KEY_FIRE) && GetVehicleModel(GetPlayerVehicleID(playerid)) == 407) {
        new 
Float:fAimingCoords[5],Float:NewCoords[3],Float:pos[3];
        
GetVehiclePos(GetPlayerVehicleID(playerid),fAimingCoords[0],fAimingCoords[1],fAimingCoords[2]);
        
GetPlayerCameraRotation(playerid,fAimingCoords[3],fAimingCoords[4]);
        
        
GetPointInFront3D(fAimingCoords[0],fAimingCoords[1],fAimingCoords[2],fAimingCoords[3],fAimingCoords[4],10.0,NewCoords[0],NewCoords[1],NewCoords[2]);
        
//Here you can do loops searching fire
        
GetDynamicObjectPos(vatra[0],pos[0],pos[1],pos[2]);
        if(
IsPointNearly2Points3D(pos[0],pos[1],pos[2],fAimingCoords[0],fAimingCoords[1],fAimingCoords[2],NewCoords[0],NewCoords[1],NewCoords[2],3.0)){
            
DestroyDynamicObject(vatra[0]);
        }
        
    }
    
    return 
1;

Include:
3DTryg.inc
Reply


Messages In This Thread
Fireman job help - by StreetboyBalkan - 03.03.2016, 15:07
Re: Fireman job help - by Vince - 03.03.2016, 16:30
Re: Fireman job help - by StreetboyBalkan - 04.03.2016, 20:11
Re: Fireman job help - by StreetboyBalkan - 05.03.2016, 20:39
Re: Fireman job help - by StreetboyBalkan - 09.03.2016, 14:26
Re: Fireman job help - by AbyssMorgan - 09.03.2016, 14:54
Re: Fireman job help - by StreetboyBalkan - 10.03.2016, 09:15

Forum Jump:


Users browsing this thread: 1 Guest(s)