AlliedModders

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

pankiller6 03-01-2010 11:16

Menu problem
 
Can someone make example how to make command to use like 5 times in map?

wrecked_ 03-01-2010 11:32

Re: Menu problem
 
Explain a little more.

pankiller6 03-01-2010 11:37

Re: Menu problem
 
Like i have a command to make zombie
and i want that he can use that command only 6 times in map

wrecked_ 03-01-2010 11:41

Re: Menu problem
 
Code:
#include <amxmodx> #define MAX_PLAYERS 32 #define ALLOWED_AMOUNT  6 new iAmount[MAX_PLAYERS+1] public plugin_init() {     register_plugin( "Your Plugin", "1.0", "You" )         register_clcmd( "zombiemake", "CMD_MakeZombie" ) } public CMD_MakeZombie( id ) {     if( iAmount[id] >= ALLOWED_AMOUNT )     {         // Executed when he's gone past the limit, put your text here                 return PLUGIN_HANDLED;     }     else     {         iAmount[id]++                 // Your code     }     return PLUGIN_HANDLED; }

pankiller6 03-01-2010 11:46

Re: Menu problem
 
Where to put text if he tries 7 time and plugin doesnt let him...

wrecked_ 03-01-2010 11:50

Re: Menu problem
 
In the first check where it says
Code:
if( iAmount[id] >= ALLOWED_AMOUNT )
that's what gets executed if he reaches the limit.

Edited my code post.

pankiller6 03-01-2010 11:55

Re: Menu problem
 
Why this dont work?

wrecked_ 03-01-2010 12:01

Re: Menu problem
 
What part isn't working?

pankiller6 03-01-2010 12:06

Re: Menu problem
 
Works perfect thanks i fixed.

How to make like in this menu if i want to make someone nemesis starts vote if more than 50% than on next round he will be nemesis

wrecked_ 03-01-2010 12:15

Re: Menu problem
 
I've never touched nor do I ever plan to touch those nemesis / ZP mods. Go check out the New AMXX Menu System Tutorial by Emp`, it has vote menus.


All times are GMT -4. The time now is 08:38.

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