AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Menu display (https://forums.alliedmods.net/showthread.php?t=159222)

Artifact 06-14-2011 08:07

Menu display
 
Look I have public Igra and there I have menu and some function... How with
PHP Code:

ExecuteHamB(Ham_CS_RoundRespawnPlayer

to get in every round to loop public Igra

Erox902 06-14-2011 10:32

Re: Menu display
 
Code:
public Ham_CS_RoundRespawn(id) { Igra(id) }

to call that every roundspawn... if thats what you asked for :S

Exolent[jNr] 06-14-2011 11:34

Re: Menu display
 
Do you want to call the Igra() function for player every time the player spawns?

Quote:

Originally Posted by Erox902 (Post 1488079)
Code:
public Ham_CS_RoundRespawn(id) { Igra(id) }

to call that every roundspawn... if thats what you asked for :S

Your code makes no sense.

Erox902 06-14-2011 18:09

Re: Menu display
 
Quote:

Originally Posted by Exolent[jNr] (Post 1488115)
Do you want to call the Igra() function for player every time the player spawns?



Your code makes no sense.

Isn't Ham_CS_RoundRespawn() just like ham_spawn?... if not then I can understand, but would'nt it be just like that if they are?
Pls correct me if i'm wrong cuz then i have a lot to fix in my plugins which always seems to work :s

Exolent[jNr] 06-14-2011 20:22

Re: Menu display
 
Quote:

Originally Posted by Erox902 (Post 1488369)
Isn't Ham_CS_RoundRespawn() just like ham_spawn?... if not then I can understand, but would'nt it be just like that if they are?
Pls correct me if i'm wrong cuz then i have a lot to fix in my plugins which always seems to work :s

It is, but you cant just name a function that and expect it to be the handler for when a player spawns.
You have to hook it with RegisterHam() and it can't be the exact name of the Ham_* constant or else it will give an error.

Erox902 06-15-2011 02:54

Re: Menu display
 
oh... well thanks for the explaination then :D

Artifact 06-15-2011 09:06

Re: Menu display
 
I have this:
PHP Code:

public Igra(id)
{
    
// My code


And I want to call it every round. How?

fysiks 06-15-2011 14:01

Re: Menu display
 
http://forums.alliedmods.net/showthread.php?t=42159

Everybody here should have this thread bookmarked.


All times are GMT -4. The time now is 23:28.

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