AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   grenade event (https://forums.alliedmods.net/showthread.php?t=12382)

Cheap_Suit 04-14-2005 03:29

grenade event
 
can any help me with a nade event? So far i got this but its not working

Code:

public plugin_init() {

register_event("TextMsg", "throw_nade", "be", "2&#Game_radio", "4&#Fire_in_the_hole")

}


public throw_nade() {

        new name[32]
        read_data(3, name, 31)
        new id = get_user_index(name)

        if(!is_user_alive(id) && !is_user_connected(id)) {

        new clip, ammo
        new weapon = get_user_weapon(id, clip, ammo)
       
        if(weapon == CSW_HEGRENADE) {
       
        //codes
 
        }
    }
        return PLUGIN_HANDLED
}


XxAvalanchexX 04-14-2005 16:46

Why do you guys still use that lame, old-fashioned method?

Code:
#include <csx> public grenade_throw(index, greindex, wId) {    // index == player id    // greindex == entity id    // wId == weapon id (CSW_*) }

Cheap_Suit 04-15-2005 05:25

Quote:

Originally Posted by XxAvalanchexX
Why do you guys still use that lame, old-fashioned method?

Code:
#include <csx> public grenade_throw(index, greindex, wId) {    // index == player id    // greindex == entity id    // wId == weapon id (CSW_*) }

is this called automaticly?

XxAvalanchexX 04-15-2005 14:01

Yes, it's a forward, but you have to include csx.

Cheap_Suit 04-16-2005 04:44

forgot to say thank you :idea: :idea: :idea:

v3x 04-17-2005 21:11

Are these valid radio messages?
Quote:

Cover_me
You_take_the_point
Hold_this_position
Regroup_team
Follow_me
Taking_fire
Go_go_go
Team_fall_back
Stick_together_team
Get_in_position_and_wait
Storm_the_front
Report_in_team
Affirmative
Roger_that
Enemy_spotted
Need_backup
Sector_clear
In_position
Reporting_in
Get_out_of_there
Negative
Enemy_down
Hostage_down
Fire_in_the_hole


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

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