AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Admin Mark (marks admins with beret or helmet) (https://forums.alliedmods.net/showthread.php?t=56751)

kaloszyfer 06-20-2007 08:32

Admin Mark (marks admins with beret or helmet)
 
5 Attachment(s)
Admin Mark 1.2

DESCRIPTION:
Plugin marks admin by adding on his head special helmet or beret. Size of model is less than 60kb, so player don't have to extra download whole admin model (size: 2Mb) like in other plugins such as KaOs' "Admin Models", but download small model in 1 sec.

FEATURES:
- if admin is CT, he wears special helmet
- if admin is T, he wears special beret

CVARS:
amx_admin_mark (0: OFF, 1: ON, default: 1) - disables/enables plugin

VERSIONS:
1.0 first release
1.1 added forcing standard models by server (you can disable this by using mp_consistency 0), optimized some code
1.2 changed really smart part of code (1 word...)



put admin_head.mdl to "models/" directory

Unfortunately helmets and berets looking good if client is using standard models. If client have custom models it may not look good..

Here are some screens:

-helmets:
gign
gsg9
sas
urban (seal)
vip

-berets:
arctic
guerilla
leet
terror

Alka 06-20-2007 08:54

Re: Admin Mark
 
Looks funny :lol:...nice! Gj :wink:

ehha 06-20-2007 09:36

Re: Admin Mark
 
nice! perhaps you can add only the "ADMIN" write to terrorist models or make a helmet for every terrorist model in the head color of the model

for example a black one for Phoenix terorist and so on....

Arion 06-20-2007 12:28

Re: Admin Mark
 
Nice plugin!

But the helmet model sucks :P

Juba_PornBorn 06-20-2007 12:51

Re: Admin Mark
 
Nice really like this one!

kaloszyfer 06-20-2007 13:19

Re: Admin Mark
 
Quote:

Originally Posted by Arion (Post 492358)
But the helmet model sucks :P

Why?! You don't like it?:mrgreen:

Quote:

Originally Posted by ehha (Post 492311)
perhaps you can add only the "ADMIN" write to terrorist models or make a helmet for every terrorist model in the head color of the model

You mean that I should change "ADM" to "ADMIN" on berets or what?
And I think beret for terrorist is better than helmet:) and colors must be distinctive, that everyone know this is admin.

Arion 06-21-2007 10:32

Re: Admin Mark
 
Quote:

Originally Posted by kaloszyfer (Post 492377)
Why?! You don't like it?:mrgreen:

Actually, no :P

But here's the big problem: Doesn't matter which model or team I choose, the helmet is always the same... even for TRs!

Any help?! :o

kaloszyfer 06-21-2007 11:44

Re: Admin Mark
 
hmm, that's weird.. Maybe try enable engine module..

EDIT: And one more thing. Did you edit model? If so, then maybe that's the cause. Try using my model from first post. Model must have 9 submodels (you can check it by using Half-Life Model Viewer)

One shot dont miss! 06-21-2007 12:17

Re: Admin Mark
 
i like this b/c you DL helmets and berets instead of like Admin Model were the whole model is replaced so GJ!

but i think the Helmets could use a little work.... but if i had a server i would use this.

Arion 06-22-2007 11:02

Re: Admin Mark
 
1 Attachment(s)
Quote:

Originally Posted by kaloszyfer (Post 492849)
hmm, that's weird.. Maybe try enable engine module..

EDIT: And one more thing. Did you edit model? If so, then maybe that's the cause. Try using my model from first post. Model must have 9 submodels (you can check it by using Half-Life Model Viewer)

Yep, I modified the model using Half-Life Model Viewer :P


And as soon as I noticed that the helmet doesn't change, I downloaded the model again :P
No results :(



When I got some time, I'll uninstall the plugin and try a clean install.. :up:



Yay! A clean install fixed everything :)

Now I'll change the model again to a darker helmet
:twisted:


Everything's fine now... and people loved my new beret :mrgreen:

Thank you!!

PS: I attached the dark model if people is interested :P
http://i41.photobucket.com/albums/e2...admin_mark.jpg

hackziner 06-22-2007 13:56

Re: Admin Mark
 
Hum, really nice plugin :)

Hawk552 06-23-2007 11:27

Re: Admin Mark
 
Code:
    if (equali(modelStr,"gign") )     {         modelID = 0     }     else if (equali(modelStr,"gsg9") )     {         modelID = 1     }     else if (equali(modelStr,"sas") )     {         modelID = 2     }     else if (equali(modelStr,"urban") )     {         modelID = 3     }     else if (equali(modelStr,"vip") )     {         modelID = 4     }     else if (equali(modelStr,"arctic") )     {         modelID = 5     }     else if (equali(modelStr,"guerilla") )     {         modelID = 6     }     else if (equali(modelStr,"leet") )     {         modelID = 7     }     else if (equali(modelStr,"terror") )     {         modelID = 8     }     else         modelID = 9

Terrible. Make a global array which stores all these names, then run a loop checking if it's each one. If it is, set model ID to the iterator's value.

I'm willing to hold this back for this optimization alone. Please do it within a week or I will unapprove this.

kaloszyfer 06-24-2007 10:12

Re: Admin Mark
 
OK, I'll try.

kmal2t 06-24-2007 15:10

Re: Admin Mark
 
Why not just make it as a stock? like:

Code:
switch(get_model(id)) {     case 1: blah blah     case 2: blah blah } stock get_model(id) {     new model[10];     cs_get_user_model(id, model, 9);     if(equal(model, "blahblah"))         return 1;     if(equal(model, "blahblah"))         return 2;     if(equal(model, "blahblah"))         return 3;     return 0; }

btw, the beret looks like a seat cushion on their head lol.

ConnorMcLeod 06-24-2007 17:05

Re: Admin Mark
 
Because this would not optimize the code.

sawce 06-24-2007 21:36

Re: Admin Mark
 
Quote:

Originally Posted by kaloszyfer (Post 494071)
OK, I'll try.

Just butting in here, I really don't see the need to put that function in prethink to begin with.

I would assume just making an array of what model ID they have at the round start would suffice. It might temporarily display the wrong helmet for the remainder of a round if an admin uses a command to force a model change, but that'd be a small price to pay for the overhead reduction.

Lee 06-24-2007 21:53

Re: Admin Mark
 
Quote:

Originally Posted by kmal2t (Post 494195)
Why not just make it as a stock?

To see what stocks actually are - as you evidently have no idea - read this.

kmal2t 06-24-2007 22:55

Re: Admin Mark
 
Eh fine then you can do it like this too:

Code:
#define myNum 3 public myFunc(id) {     new const array[myNum][] = {         "shit0",         "shit1",         "shit2"         };     for(new i=0;i<myNum;i++) {         if(equal(tuna, array[i])) {             shit;         }     } }

This also begs the question, as a GENERAL rule how many ifs would it be before it's a better idea to use a loop instead?

kaloszyfer 06-25-2007 06:28

Re: Admin Mark
 
Plugin updated!

Alka 06-25-2007 07:18

Re: Admin Mark
 
1.Don't use "stock" at get_model(id).
2.like sawce said
Quote:

Originally Posted by sawce
Just butting in here, I really don't see the need to put that function in prethink to begin with.

EDIT:Yes public !

kaloszyfer 06-25-2007 07:40

Re: Admin Mark
 
1.What else then? 'public'?
2.OK, I'll change that

kaloszyfer 06-25-2007 08:12

Re: Admin Mark
 
It don't work with roundstart() or with client_spawn() so I'll just leave client_PreThink() like it was before. I think it's better, besides Hawk said to change only get_model_id part.
And one more thing, why not 'stock' at get_model_id()?

Alka 06-25-2007 08:15

Re: Admin Mark
 
Because this! Read carefully.
Quote:

Originally Posted by Lee (Post 494337)
To see what stocks actually are - as you evidently have no idea - read this.


kaloszyfer 06-25-2007 08:26

Re: Admin Mark
 
OK, thx
Plugin updated to 1.2! I think it's last update..
Say what you think about code now Alka.:wink:

Alka 06-25-2007 09:00

Re: Admin Mark
 
1 Attachment(s)
Code looks good! If i use this
Code:

force_unmodified(....)
,I got an error...:|

Here is my version!
-Using "New round" to set model!
-Minor fix.

Works perfect! :P...

freamer 06-26-2007 06:47

Re: Admin Mark
 
works fine on my server,no crashes or bugs detected

Podunk 06-27-2007 09:44

Re: Admin Mark
 
very cool thanks

I may modify it so it gives anyone with my clan tag the models

Podunk 06-30-2007 07:16

Re: Admin Mark
 
I had to set mp_consistency 0 on my server so some people can connect, don't know if it has to to with this plugin or not.

stealth5706 07-06-2007 01:06

Re: Admin Mark
 
Quote:

Originally Posted by Podunk (Post 496489)
I had to set mp_consistency 0 on my server so some people can connect, don't know if it has to to with this plugin or not.

what is consistency??? and i had to do that to to make it to where people could join my server...:grrr::evil::grrr:

sQn 07-08-2007 10:17

Re: Admin Mark
 
Hej.Ja mam no steam i admin mark nie działa na moim servie do cs 1.6.Więc mam prośbę.Jakbyś mógł to prześlij mi source code na no steam Kaloszyfer.Zgóry thx.

RODAK sQn :)

sQn 07-12-2007 09:06

Re: Admin Mark
 
GJ +KARMA !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Weed 07-13-2007 02:40

Re: Admin Mark
 
nice thing!!!! i was looking for something like that awesome job +K

ConnorMcLeod 07-13-2007 02:51

Re: Admin Mark
 
Nice plugin, nice idea.

Shouldn't you end the loop when finding the player model with something like that ?
PHP Code:

for(new 09i++)
    {
        if (
equali (modelStrmodelname[i]) )
        {
            
modelID i
            
break
        }
    } 


Weed 07-14-2007 15:32

Re: Admin Mark
 
yo plugin dosent work for me it give an erroe models/terror/terror.mdl

Weed 07-14-2007 19:52

Re: Admin Mark
 
any help?

kaloszyfer 07-19-2007 05:43

Re: Admin Mark
 
Type 'mp_consistency 0' in console before you start server. I think you have custom player models.

nuke101 07-20-2007 18:17

Re: Admin Mark
 
Can anyone help me? I've installed it on my server, but when I type "amx_admin_mark 1" I got unknown command.
I've activated this plug-in in config/plugins.ini with amx_admin_mark.amxx.

Czarny Iwan 07-20-2007 19:04

Re: Admin Mark
 
Why are you typing it? Isn't it default to 1?

nuke101 07-20-2007 19:32

Re: Admin Mark
 
YA! It worked. I don't know what I did..lol

ehha 07-27-2007 04:39

Re: Admin Mark
 
for example i got some admins only with one flag (including custom flags) it detects any admin flag from A to U?


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

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