Raised This Month: $ Target: $400
 0% 

Limit?


Post New Thread Reply   
 
Thread Tools Display Modes
Front Line
Senior Member
Join Date: Jan 2005
Old 07-10-2005 , 08:32  
Reply With Quote #21

Thanks for your best man...

But i am trying to achieve that only one person can be the GIGN model...

Get what i'm saying.
__________________
My plugins...

Are all Here...Click Me
Front Line is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 07-10-2005 , 15:53  
Reply With Quote #22

I believe you're looking for something like this? ( Sorry if my vars confuse you )
Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> public plugin_init() {     // ...     register_clcmd("amx_checkgigns","CheckGigns",ADMIN_LEVEL_A,"- Limits gigns to 4") } new bool:g_bIsGign[33] new g_nGignCount new g_szModel[]="SAS"       // Model that GIGN is replaced by #define MAX_GIGNS   4   // Max # of GIGNS public client_connect(id) g_bIsGign[id] = false public client_disconnect(id) g_bIsGign[id] = false public CheckGigns(id,level,cid) {     if(!cmd_access(id,level,cid,1))         return PLUGIN_HANDLED     new aPlayers[32],iNum     g_nGignCount = 0     get_players(aPlayers,iNum)     for (new i=0;i<=iNum;i++)     {         if(!is_user_connected(aPlayers[i])) continue         if(cs_get_user_team(aPlayers[i]) != CS_TEAM_CT) continue         new szModel[32]         cs_get_user_model(aPlayers[i],szModel,31)         if(equali(szModel,"GIGN"))             g_bIsGign[aPlayers[i]] = true         g_nGignCount++         if(g_nGignCount >= MAX_GIGNS) break     }     set_task(2.0,"CheckAgain")     return PLUGIN_HANDLED } public CheckAgain() {     new aPlayers[32],iNum,i     get_players(aPlayers,iNum)     new szModel[32]     for(i=0;i<=iNum;i++)     {         if(!is_user_connected(aPlayers[i])) continue         if(( equali(szModel,"GIGN") ) && ( !g_bIsGign[aPlayers[i]] ))         {             cs_set_user_model(aPlayers[i],g_szModel)         }     }     return PLUGIN_HANDLED }
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Front Line
Senior Member
Join Date: Jan 2005
Old 07-10-2005 , 22:46  
Reply With Quote #23

thanks v3x i willtest this.

mind if i change the variables to what would suit me?

Code:
        if(equali(szModel,"GIGN"))

but didn't u say czmodel was the one your changing the gign from?
SAS is what i think u wrote...

lik if GIGN aldy = 1
then it will say sorry there is somebody alrdy being that model...
etc...
i mean the rest of the tesam lik sas gsg9 can have as many
as they want i just want this but i see that what u've done
it when sumone picks the Gign and it alrdy has one it auto switches
then to SAS right?
__________________
My plugins...

Are all Here...Click Me
Front Line is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 07-12-2005 , 00:20  
Reply With Quote #24

No, I don't mind. I was just using Hungarian Notation. ;)

What this plugin will/SHOULD do:
Check the # of ppl with GIGN models ( CTS ), see if it's over the max amount ( definable ), then change their models to "SAS" models if they aren't the first X amount of GIGNS. Remember, you can tell the script how many GIGNS you want. Test it.. ;)
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Front Line
Senior Member
Join Date: Jan 2005
Old 07-12-2005 , 00:54  
Reply With Quote #25

Why thank u v3x u came thru for me

LUK TUNG BOWL UNE - then there was one...
__________________
My plugins...

Are all Here...Click Me
Front Line is offline
Front Line
Senior Member
Join Date: Jan 2005
Old 07-12-2005 , 01:49  
Reply With Quote #26

i tried editing it...
For GIGN n GUERILLA...

I have alrdy defined the symbol etc...

Code:
{         register_clcmd("amx_checkgigns","CheckGigns",ADMIN_LEVEL_A,"- Limits gigns to 1")         register_clcmd("amx_checkguerilla","CheckGuerilla",ADMIN_LEVEL_A,"- Limits guerilla to 1")   } new bool:g_bIsGign[33] new g_nGignCount new g_szModel[]="SAS"        // Model that GIGN is replaced by #define MAX_GIGNS    1    // Max # of GIGNS public client_connect(id) g_bIsGign[id] = false   //LINE 654!!! public client_disconnect(id) g_bIsGign[id] = false public CheckGigns(id,level,cid) {     if(!cmd_access(id,level,cid,1))         return PLUGIN_HANDLED     new aPlayers[32],iNum     g_nGignCount = 0     get_players(aPlayers,iNum)     for (new i=0;i<=iNum;i++)     {         if(!is_user_connected(aPlayers[i])) continue         if(cs_get_user_team(aPlayers[i]) != CS_TEAM_CT) continue         new szModel[32]         cs_get_user_model(aPlayers[i],szModel,31)         if(equali(szModel,"GIGN"))             g_bIsGign[aPlayers[i]] = true         g_nGignCount++         if(g_nGignCount >= MAX_GIGNS) break     }     set_task(2.0,"CheckAgain")     return PLUGIN_HANDLED } public CheckAgain() {     new aPlayers[32],iNum,i     get_players(aPlayers,iNum)     new szModel[32]     for(i=0;i<=iNum;i++)     {         if(!is_user_connected(aPlayers[i])) continue         if(( equali(szModel,"GIGN") ) && ( !g_bIsGign[aPlayers[i]] ))         {             cs_set_user_model(aPlayers[i],g_szModel)         }     }     return PLUGIN_HANDLED } new bool:g_bIsGuerilla[33] new g_nGuerillaCount new g_szModel[]="Terror"        // LINE 709!!! #define MAX_GUERILLA   1    // Max # of Guerilla public client_connect(id) g_bIsGuerilla[id] = false public client_disconnect(id) g_bIsGuerilla[id] = false public CheckGuerilla(id,level,cid) {     if(!cmd_access(id,level,cid,1))         return PLUGIN_HANDLED     new aPlayers[32],iNum     g_nGuerillaCount = 0     get_players(aPlayers,iNum)     for (new i=0;i<=iNum;i++)     {         if(!is_user_connected(aPlayers[i])) continue         if(cs_get_user_team(aPlayers[i]) != CS_TEAM_T) continue         new szModel[32]         cs_get_user_model(aPlayers[i],szModel,31)         if(equali(szModel,"GUERILLA"))             g_bIsGign[aPlayers[i]] = true         g_nGuerillaCount++         if(g_nGuerillaCount >= MAX_GUERILLA) break     }     set_task(2.0,"CheckAgain")     return PLUGIN_HANDLED } public CheckAgain() {     new aPlayers[32],iNum,i     get_players(aPlayers,iNum)     new szModel[32]     for(i=0;i<=iNum;i++)     {         if(!is_user_connected(aPlayers[i])) continue         if(( equali(szModel,"Terror") ) && ( !g_bIsGuerilla[aPlayers[i]] ))         {             cs_set_user_model(aPlayers[i],g_szModel)         }     }     return PLUGIN_HANDLED }

and i have these errors...
/home/groups/amxmodx/tmp/phpXpXxdd.sma(654) : error 021: symbol already defined: "client_connect"
/home/groups/amxmodx/tmp/phpXpXxdd.sma(709) : error 021: symbol already defined: "g_szModel"
/home/groups/amxmodx/tmp/phpXpXxdd.sma(713) : error 021: symbol already defined: "client_connect"
/home/groups/amxmodx/tmp/phpXpXxdd.sma(714) : error 021: symbol already defined: "client_disconnect"
/home/groups/amxmodx/tmp/phpXpXxdd.sma(747) : error 021: symbol already defined: "CheckAgain"

But i dunt wanna have to makeit that if they pushed Guerilla they dunt go to ct>Sas...

Thanks
__________________
My plugins...

Are all Here...Click Me
Front Line is offline
Platnum
Member
Join Date: May 2005
Old 07-12-2005 , 01:52  
Reply With Quote #27

Errr, you have duplicate coding... looks like you have it pasted twice..
Platnum is offline
Front Line
Senior Member
Join Date: Jan 2005
Old 07-12-2005 , 02:14  
Reply With Quote #28

thats right

I just have to change the variables i guess...

thats why i got its alrdy defined.
__________________
My plugins...

Are all Here...Click Me
Front Line is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:22.


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