AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help with weapongive (https://forums.alliedmods.net/showthread.php?t=213561)

Balck 04-16-2013 09:14

Help with weapongive
 
PHP Code:

public plugin_init()
{
    
register_plugin"D2 texture abuse fix""1.0""Simo123" );

    new 
map[32];
    
get_mapname(map31);

    if ( 
equal(map"de_dust2") )
    {
        new 
Ent create_entity"info_target" );

        
entity_set_modelEnt"models/w_ak47.mdl" );
        
entity_set_originEntFloat:{1280.9229731696.53015144.251724} );
        
entity_set_vectorEntEV_VEC_anglesFloat:{000} );
        }


Hi i need a plugin that gives ak47 4 exemple if i'm at this position
PHP Code:

entity_set_originEntFloat:{1280.9229731696.53015144.251724} ) 

and i press E then give me a ak47
PHP Code:

give_item(id "weapon_ak47"

Plzz help :)

Balck 04-17-2013 08:35

Re: Help with weapongive
 
Ok i have create this but plzz help if anyone can

PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <cstrike>
#include <fun>

public plugin_init()
{
    
register_plugin"D2 texture abuse fix""1.0""Simo123" );

    new 
map[32];
    
get_mapname(map31);


    if ( 
equal(map"de_dust2") )
    {
        new 
Ent create_entity"info_target" );

        
entity_set_modelEnt"models/w_ak47.mdl" );
        
entity_set_originEntFloat:{1280.9229731696.53015144.251724} );
        
entity_set_vectorEntEV_VEC_anglesFloat:{000} );
        }
}

public 
client_PreThink(id)
{       
    new 
button get_user_button(id)

        
        if (
button IN_USE//how can i set here if entity_set_origin( Ent, Float:{1280.922973, 1696.530151, 44.251724} ) to give me ak47  
        
{
                
give_item(id"weapon_ak47")
        }


:cry:

Podarok 04-17-2013 09:42

Re: Help with weapongive
 
Use fakemeta pev

EpicMonkey 04-17-2013 09:51

Re: Help with weapongive
 
use get_user_aiming, check targets class name, if its equal to "info_target", give him the ak47 , and make sure you set the distance right in get_user_aiming so players would only be able to pick it up when they are close to the entity

Podarok 04-17-2013 09:55

Re: Help with weapongive
 
I didnt get what you want to do, but you can check entity origin with pev_origin check. Or 2nd option: contact a dog-guy layka_LUBII to help you!

Balck 04-17-2013 16:34

Re: Help with weapongive
 
http://www.fileden.com/files/2012/3/17/3279554/ak47.bmp


ok if i press E at te ak47 in wall then give me a ak47 :S and i need the complet plugin if someone can do it

wickedd 04-18-2013 09:21

Re: Help with weapongive
 
Quote:

Originally Posted by Balck (Post 1934692)
http://www.fileden.com/files/2012/3/17/3279554/ak47.bmp


ok if i press E at te ak47 in wall then give me a ak47 :S and i need the complet plugin if someone can do it

Try to do it yourself or post in the request forum.


All times are GMT -4. The time now is 10:48.

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