AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Code Snippets/Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=83)
-   -   [FAQ/Tutorial] CS Bomb Scripting (https://forums.alliedmods.net/showthread.php?t=40164)

P34nut 11-28-2006 10:21

Re: CS Bomb Scripting FAQ/Tutorial
 
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 }

The Specialist 11-28-2006 10:41

Re: CS Bomb Scripting FAQ/Tutorial
 
:wink: 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();

Rolnaaba 11-29-2006 17:28

Re: CS Bomb Scripting FAQ/Tutorial
 
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

The Specialist 11-30-2006 14:09

Re: CS Bomb Scripting FAQ/Tutorial
 
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 ?

P34nut 11-30-2006 14:12

Re: CS Bomb Scripting FAQ/Tutorial
 
Check if the user is connected.. mayb he disconnect and drop the bomb

The Specialist 11-30-2006 14:14

Re: CS Bomb Scripting FAQ/Tutorial
 
nope it was me by myslef in my test server dropping the bomb . :|

VEN 11-30-2006 14:25

Re: CS Bomb Scripting FAQ/Tutorial
 
In your code you had:

Code:


public func(id) {
    new id = ...
}

This is incorrect and dangerous. Don't ever do that.

The Specialist 11-30-2006 14:28

Re: CS Bomb Scripting FAQ/Tutorial
 
passing id as a function paramter in a log_event ?? i see what your saying now . ill go test it thanks VEN:up:

VEN 11-30-2006 14:33

Re: CS Bomb Scripting FAQ/Tutorial
 
Yes, that too, but that not what i meant.

The Specialist 11-30-2006 14:39

Re: CS Bomb Scripting FAQ/Tutorial
 
what else were you saying ? cuase that fixed it lol . thanks:up:


All times are GMT -4. The time now is 12:53.

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