AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Furtive airplane (https://forums.alliedmods.net/showthread.php?t=271211)

josefort360 09-07-2015 17:50

Furtive airplane
 
This plugin is of kill streaks, when i use this kill streak, throw bombs in the direction of your camera, but when i throw the plane only go to one way, let's call 0, and after i use again this KS and i move my camera 90º and the plane go to the same way of before, the called 0.


PHP Code:

public CreatePlane4(id)
{
    new 
Float:Origin[3], Float:Angle[3], Float:Velocity[3], ent;
    
    
get_user_origin(idPobraneOrigin3);
    
    
velocity_by_aim(id1000Velocity);
    
entity_get_vector(idEV_VEC_originOrigin);
    
entity_get_vector(idEV_VEC_v_angleAngle);
    
    
Angle[0] = Velocity[2] = 0.0;
    
Origin[2] += 200.0;
    
    
ent create_ent(id"samolot""models/avionbueno.mdl"28Origin)
    
    
entity_set_vector(entEV_VEC_velocityVelocity);
    
entity_set_vector(entEV_VEC_anglesAngle);
    
    
emit_sound(entCHAN_ITEM"mw/jet_fly1.wav"1.0ATTN_NORM0PITCH_NORM);
    
set_task(4.5"del_plane"ent+5731);
}

public 
CreateBombs2(taskid)
{
    new 
id = (taskid-997);
    
numx[id] += 100
    

    
new radlocation[3];
    
PobraneOrigin[0] += numx[id];
    
PobraneOrigin[1] += -100;
    
PobraneOrigin[2] += 50;
    
    for(new 
i=0i<15i++) 
    {
        
radlocation[0] = PobraneOrigin[0]+1*random_num(-150,150); 
        
radlocation[1] = PobraneOrigin[1]+1*random_num(-150,150); 
        
radlocation[2] = PobraneOrigin[2]; 
        
        new 
Float:LocVec[3]; 
        
IVecFVec(radlocationLocVec); 
        
create_ent(id"bomb""models/p_hegrenade.mdl"210LocVec);
    



RedSword 09-08-2015 14:55

Re: Furtive airplane
 
Moved to AMXX section (seems to be the same as https://amxmodx-es.com/Thread-Proble...ar-una-entidad).


All times are GMT -4. The time now is 22:13.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.