Raised This Month: $ Target: $400
 0% 

No Display model


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Scherzo
Senior Member
Join Date: Feb 2007
Location: Kwidzyn, Poland
Old 05-15-2009 , 13:50   No Display model
Reply With Quote #1

Hi,
I have a problem. I`m preparing plugin AMXX Punisher, which allow to slay player in different ways. One of them is Apache attack. On listenserver it works good, but on dedicated plugin does not display Apache model (models/apache.mdl), but other (sound and slay) functions still works. What did I do wrong?
Code:
//Apache!
FallDownPlayer(id, iTarget){    
    new tid=TASK_FALL+iTarget;
    if(task_exists(tid))
        return;
    g_freeze[iTarget]=true;
    new Float:fOrigin[3];
    pev(iTarget, pev_origin, fOrigin);
    fOrigin[2]+=500.0;
    
    new entity=engfunc(EngFunc_CreateNamedEntity, engfunc( EngFunc_AllocString, "info_target" ));
    engfunc( EngFunc_SetOrigin, entity, fOrigin );
    set_pev(entity, pev_owner, iTarget);
    set_pev(entity, pev_euser1, id);
    engfunc( EngFunc_SetModel, entity, FALL_DOWN);
    engfunc( EngFunc_SetSize, entity, Float:{-1.0, -1.0, -1.0}, Float:{1.0, 1.0, 1.0});
    dllfunc( DLLFunc_Spawn, entity );
    set_pev(entity, pev_velocity, Float:{0.0, 0.0, -350.0});
    new Float:fAngles[3];
    fAngles[0]=0.0;
    fAngles[1]=random_float(0.0, 360.0);
    fAngles[2]=0.0;
    set_pev(entity, pev_angles, fAngles);
    set_pev(entity, pev_movetype, MOVETYPE_FLY);
    set_pev(entity, pev_solid, SOLID_SLIDEBOX);
    set_pev(entity, pev_animtime, 1.0);
    set_pev(entity, pev_framerate, 1.0);

    emit_sound(iTarget, CHAN_AUTO, gHeliSound, 1.0, ATTN_NORM, 0, PITCH_NORM);
    
    new param[1];
    param[0]=entity;
    set_task(0.8, "eventFallDown",TASK_FALL+iTarget,param,1);
}
public eventFallDown(param[]){
    if(pev_valid(param[0])){
        new id=pev(param[0], pev_owner);
        g_freeze[id]=false;
        set_pev(id, pev_gravity, 1.0);
        slay( pev(param[0], pev_euser1), id);
        set_task(0.2, "StopFallDown",TASK_FALL+id, param, 1);
    }
    
}
public StopFallDown(param[]){
    if(pev_valid(param[0])){
        new id=pev(param[0], pev_owner);
        set_pev(param[0], pev_velocity, Float:{0.0, 0.0, 0.0});
        set_task(0.5, "GoUpFallDown",TASK_FALL+id, param, 1);
    }
}
public GoUpFallDown(param[]){
    if(pev_valid(param[0])){
        new id=pev(param[0], pev_owner);
        set_pev(param[0], pev_velocity, Float:{0.0, 0.0, 350.0});
        set_task(1.0, "RemoveFallDown",TASK_FALL+id, param, 1);
    }
}    
public RemoveFallDown(param[]){
    if(pev_valid(param[0])){
        engfunc(EngFunc_RemoveEntity, param[0]);
    }
}

Last edited by Scherzo; 05-15-2009 at 13:53.
Scherzo is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:30.


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