AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to get event end_round + other misc Q's? (https://forums.alliedmods.net/showthread.php?t=15145)

07-11-2005 13:03

How to get event end_round + other misc Q's?
 
I have some experience with c++ and java thus im not totaly out there but i cant find documentation e.g. for do something like this
if (end_round = true)
{
Do this and that
}

Also how "deep" does the language work?
Would this work or do i have to get the number out of the function first?
If (get_playersnum() < 10)
{
Do this and that
}

Also is there a function/command to find out the max slots the server has?

I tried to look the tutorials trough but didnt find what i was looking for.

VanillA Ice 07-11-2005 13:37

Okay first go to the home page and look at documents.....and if you want to know functions look at funcwiki http://www.amxmodx.org/funcwiki.php

And there are know classes,pointers, and some other stuff.....just look at the docs http://www.amxmodx.org/doc/



And the end_round is most likely an enity...to my understanding..

07-11-2005 14:03

Thanks, i found the max players but to know when the round is ended is still missing (actually the important one).
Search comes up zero when searching end_round. Are you sure it is end_round?

and would the "If (get_playersnum() < 10)" work or does it hang up?

Platnum 07-11-2005 14:09

register_event("SendAudio","roundend_event"," a","2=%!MRAD_terwin","2=%!MRAD_ctwin","2=%!MR AD_rounddraw")

put that in plugin_init()

When the round ends it will call roundend_event (as long as the sounds play... 'counter-terrorists win', 'terrorists win', or 'round draw').

So just make a function called roundend_event

public roundend_event()
{
//what to do
}

I took this out of a plugin called ispy by jghg & Girthesniper

07-11-2005 17:15

Thanks, this will leat me get forward.

Any idea would this "deep" code work?
Code:

new Players[get_players()][1]
Thus it would do table that has as many rows as there is players and 2 colums.

WaZZeR++ 07-11-2005 17:30

think you should use get_playersnum() then...

07-11-2005 18:19

well eh.. would "new Players[get_playersnum()][1]" work?

mobytoss 07-11-2005 18:59

you wouldnt need the [1]

07-11-2005 19:39

not even if i want table that has 2x collums?
First one containing all player id's(thus i need as many rows as there is players), the second one having some number.

VanillA Ice 07-12-2005 01:29

You wouldnt need to colums...its half life...you only have 32 avalaible slots..... creating more would just be a waste of memory...


All times are GMT -4. The time now is 19:51.

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