AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to show menu when respawn ? (https://forums.alliedmods.net/showthread.php?t=243130)

Awesome_man 06-30-2014 06:38

How to show menu when respawn ?
 
Hello,
I want to know how to show a menu (i already has menu plugin)
I mean how to do, when player spawn a say command /menu exec on him ?

Flick3rR 06-30-2014 06:57

Re: How to show menu when respawn ?
 
PHP Code:

engclient_cmd(id"say /menu"


Awesome_man 06-30-2014 07:01

Re: How to show menu when respawn ?
 
Quote:

Originally Posted by Flick3rR (Post 2159614)
PHP Code:

engclient_cmd(id"say /menu"


No bro, i am beginner scripter.. I only have menu i want every player type /menu when they respawn then dey can access menu

Flick3rR 06-30-2014 07:37

Re: How to show menu when respawn ?
 
Then just display the menu on their respawn?! Or if you want it with command, register the /menu command -->
PHP Code:

register_clcmd("say /menu""cmdDisplayMenu"

and then in the cmdDisplayMenu function, you display the menu.

Awesome_man 06-30-2014 09:18

Re: How to show menu when respawn ?
 
ok

Flick3rR 06-30-2014 09:29

Re: How to show menu when respawn ?
 
Quote:

Originally Posted by Flick3rR (Post 2159614)
PHP Code:

engclient_cmd(id"say /menu"


Just execute it on spawn?!

Awesome_man 06-30-2014 09:39

Re: How to show menu when respawn ?
 
Quote:

Originally Posted by Flick3rR (Post 2159668)
Just execute it on spawn?!

How ? i'm noob and beginner scripter bro :\ please help

Edit :-

Where to put this ?

Code:

RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1)
}
 
public
fwHamPlayerSpawnPost(iPlayer) {
        if (
is_user_alive(iPlayer)) {
               
// player spawned
       
}
}

engclient_cmd(id, "say /menu")


Flick3rR 06-30-2014 10:31

Re: How to show menu when respawn ?
 
INSIDE THE FUNCTION?! o.O O.o

Awesome_man 06-30-2014 11:19

Re: How to show menu when respawn ?
 
Quote:

Originally Posted by Flick3rR (Post 2159701)
INSIDE THE FUNCTION?! o.O O.o

:'( i mean where to put dis in my code ? plz coperate i'm just beginner :\

Porta0123 06-30-2014 11:39

Re: How to show menu when respawn ?
 
i think Flick3rR mean this :

Code:
public plugin_precache() // or Plugin_init() { RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1) }   public fwHamPlayerSpawnPost(iPlayer) {         if (is_user_alive(iPlayer)) {                engclient_cmd(iPlayer, "say /menu")           } }


All times are GMT -4. The time now is 21:15.

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