Raised This Month: $32 Target: $400
 8% 

[FAQ/Tutorial] CS Bomb Scripting


Post New Thread Reply   
 
Thread Tools Display Modes
P34nut
AMX Mod X Beta Tester
Join Date: Feb 2006
Location: Netherlands
Old 11-28-2006 , 10:21   Re: CS Bomb Scripting FAQ/Tutorial
Reply With Quote #11

Code:
public plugin_init() {     register_plugin("test", "1.0", "test")     register_logevent("BombPlantEvent", 3, "2=Planted_The_Bomb"); // Bomb planted Event     register_logevent("BombDefusedEvent", 3, "2=Defused_The_Bomb"); // Bomb Defused Event } public BombPlantEvent() { // Bomb planted } public BombDefusedEvent() { // Bomb defused }
__________________
All you need to change the world is one good lie and a river of blood
P34nut is offline
The Specialist
BANNED
Join Date: Nov 2006
Old 11-28-2006 , 10:41   Re: CS Bomb Scripting FAQ/Tutorial
Reply With Quote #12

Also realize that log_events dont have any id's that can be passed . So in order to call an a function on a player you have to use VEN's stock get_loguser_index function and do id = get_loguser_index();
The Specialist is offline
Send a message via AIM to The Specialist
Rolnaaba
Veteran Member
Join Date: May 2006
Old 11-29-2006 , 17:28   Re: CS Bomb Scripting FAQ/Tutorial
Reply With Quote #13

um knew that already there specialist was wondering about sorting I got the impression that the func had to be named logevent_function_p I was wrong ty P34nut
__________________
DO NOT PM me about avp mod.
Rolnaaba is offline
The Specialist
BANNED
Join Date: Nov 2006
Old 11-30-2006 , 14:09   Re: CS Bomb Scripting FAQ/Tutorial
Reply With Quote #14

can you tell me why i get this error when using your log index function with a bomb drop ?

Code:
L 11/30/2006 - 12:42:21: Start of error session.
L 11/30/2006 - 12:42:21: Info (map "de_dust_cz") (logfile "error_113006.log")
L 11/30/2006 - 12:42:21: [CSTRIKE] Invalid player 1
L 11/30/2006 - 12:42:22: [AMXX] Displaying debug trace (plugin "follow_the_bomb.amxx")
L 11/30/2006 - 12:42:22: [AMXX] Run time error 10: native error (native "cs_get_user_money")
L 11/30/2006 - 12:42:22: [AMXX] [0] follow_the_bomb.sma::punish_mode (line 111)
L 11/30/2006 - 12:42:22: [AMXX] [1] follow_the_bomb.sma::bomb_is_dropped (line 180)
It only happens with a bomb drop event . any ideas ?
The Specialist is offline
Send a message via AIM to The Specialist
P34nut
AMX Mod X Beta Tester
Join Date: Feb 2006
Location: Netherlands
Old 11-30-2006 , 14:12   Re: CS Bomb Scripting FAQ/Tutorial
Reply With Quote #15

Check if the user is connected.. mayb he disconnect and drop the bomb
__________________
All you need to change the world is one good lie and a river of blood
P34nut is offline
The Specialist
BANNED
Join Date: Nov 2006
Old 11-30-2006 , 14:14   Re: CS Bomb Scripting FAQ/Tutorial
Reply With Quote #16

nope it was me by myslef in my test server dropping the bomb .
The Specialist is offline
Send a message via AIM to The Specialist
VEN
Veteran Member
Join Date: Jan 2005
Old 11-30-2006 , 14:25   Re: CS Bomb Scripting FAQ/Tutorial
Reply With Quote #17

In your code you had:

Code:
 
public func(id) {
    new id = ...
}
This is incorrect and dangerous. Don't ever do that.
VEN is offline
The Specialist
BANNED
Join Date: Nov 2006
Old 11-30-2006 , 14:28   Re: CS Bomb Scripting FAQ/Tutorial
Reply With Quote #18

passing id as a function paramter in a log_event ?? i see what your saying now . ill go test it thanks VEN
The Specialist is offline
Send a message via AIM to The Specialist
VEN
Veteran Member
Join Date: Jan 2005
Old 11-30-2006 , 14:33   Re: CS Bomb Scripting FAQ/Tutorial
Reply With Quote #19

Yes, that too, but that not what i meant.
VEN is offline
The Specialist
BANNED
Join Date: Nov 2006
Old 11-30-2006 , 14:39   Re: CS Bomb Scripting FAQ/Tutorial
Reply With Quote #20

what else were you saying ? cuase that fixed it lol . thanks
The Specialist is offline
Send a message via AIM to The Specialist
Reply


Thread Tools
Display Modes

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 16:28.


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