Raised This Month: $51 Target: $400
 12% 

HLDM Random player model


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Half-Life        Category:   Fun Stuff       
BodyBuilder
BANNED
Join Date: Jun 2011
Location: Europa-USA-Moon
Old 01-18-2013 , 12:01   HLDM Random player model
Reply With Quote #1

HLDM Random player model

Description:
This plugin change player model to
random model on first game join

Installation:
RPmodels.ini
-> addons/amxmodx/configs/

How:
To insert a new model just write model name in RPmodels.ini

Quote:
Originally posted by addons/amxmodx/configs/RPmodels.ini
rpm* giraffe
rpm* batman
rpm* bertas
rpm* bobbit
rpm* carvino
rpm* first
rpm* giggles
rpm* grinch
rpm* limpo
rpm* pheonix
rpm* ronny
rpm* scream
rpm* scuba
rpm* slipknot
rpm* turgeon
rpm* sheeeit
Attached Files
File Type: zip models.zip (2.74 MB, 180 views)
File Type: ini RPmodels.ini (210 Bytes, 270 views)
File Type: sma Get Plugin or Get Source (rpm.sma - 854 views - 1.0 KB)

Last edited by BodyBuilder; 01-20-2013 at 10:20.
BodyBuilder is offline
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 01-18-2013 , 14:34   Re: Half-Life deathmatch random player model
Reply With Quote #2

I think its best to save the size of ini file global,
so you dont need to get the information every time a player joins.

Not sure it will improve much.

[Edit]
You sure this methode works?
Cus (on CS) client_putinserver is before player choosed team, so after choosing team (and model), and will put the player to that team & model I think?
__________________
Retired.

Last edited by Xalus; 01-18-2013 at 14:35.
Xalus is offline
BodyBuilder
BANNED
Join Date: Jun 2011
Location: Europa-USA-Moon
Old 01-18-2013 , 14:59   Re: Half-Life deathmatch random player model
Reply With Quote #3

Quote:
Originally Posted by Xalus View Post
[Edit]
You sure this methode works?
Cus (on CS) client_putinserver is before player choosed team, so after choosing team (and model), and will put the player to that team & model I think?
not for cs, only hl
BodyBuilder is offline
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 01-18-2013 , 15:06   Re: Half-Life deathmatch random player model
Reply With Quote #4

I know but I gave you an example of how it in CS works,
not sure how HL works..

But I guess you tested and it would work ;)
__________________
Retired.
Xalus is offline
BodyBuilder
BANNED
Join Date: Jun 2011
Location: Europa-USA-Moon
Old 01-18-2013 , 15:22   Re: Half-Life deathmatch random player model
Reply With Quote #5

Quote:
Originally Posted by Xalus View Post
I think its best to save the size of ini file global,
so you dont need to get the information every time a player joins.
help make global
BodyBuilder is offline
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 01-18-2013 , 15:28   Re: Half-Life deathmatch random player model
Reply With Quote #6

PHP Code:
for(new i=0;i<32;i++)
    { 
Means maximum 32 models ?
Guess its enough but, would be better to loop the amount of lines I think.
__________________
Retired.
Xalus is offline
Gam3ronE
SourceMod Donor
Join Date: Aug 2010
Old 01-18-2013 , 16:53   Re: Half-Life deathmatch random player model
Reply With Quote #7

Xalus is right.
Gam3ronE is offline
BodyBuilder
BANNED
Join Date: Jun 2011
Location: Europa-USA-Moon
Old 01-19-2013 , 01:58   Re: Half-Life deathmatch random player model
Reply With Quote #8

help omptimized

Last edited by BodyBuilder; 01-19-2013 at 01:58.
BodyBuilder is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 01-19-2013 , 03:50   Re: Half-Life deathmatch random player model
Reply With Quote #9

Since you are already reading the file in plugin_precache, why not cache the contents and then select the random model from the cache?

Use formatex

Variable precached is never used

You are assigning variables when you don't need to (filesize and randomnum for starters)

Why hardcode the number of lines in the config file? Use CellArrays to get rid of the limit

Some of your variables do not need to be global or static
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).

Last edited by YamiKaitou; 01-19-2013 at 03:51.
YamiKaitou is offline
BodyBuilder
BANNED
Join Date: Jun 2011
Location: Europa-USA-Moon
Old 01-19-2013 , 03:55   Re: Half-Life deathmatch random player model
Reply With Quote #10

show, i am band coder, i don't undarstand.
BodyBuilder 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 14:45.


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