Cerere plugin modele playeri!

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Post Reply
Bunica1
Membru, skill 0
Membru, skill 0
Posts: 11
Joined: 20 Mar 2011, 18:59
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Contact:

21 Apr 2011, 13:06

Salut am gasit pe net un plugin care schimba modelele la admini (sunt imbracati alt fel) dar eu nu vreau numai la admini vreau ca toti playerii sa fie imbracati asa! astept
RoyalServer 2
User avatar
TryAll
Membru, skill 0
Membru, skill 0
Posts: 29
Joined: 21 Apr 2011, 10:01
Detinator Steam: Nu
CS Status: Invat PROGRAMARE !
Detinator server CS: Respawn.CSNSDAP.Ro
Has thanked: 3 times
Been thanked: 1 time
Contact:

21 Apr 2011, 14:09

Postati si sursa pentru ca sa o modificam
Image
Image
Bunica1
Membru, skill 0
Membru, skill 0
Posts: 11
Joined: 20 Mar 2011, 18:59
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Contact:

21 Apr 2011, 17:52

uitati aici care se pricepe ! acesta este.sma si el este pus sa puna modele numai la administie cineva sal editeze sa apara modele la toti jucatorii?

Code: Select all

/*########################################################################## 
## 
## -- http://www.SteamTools.net 
##      ___   _____       ___  ___   _   __   _            ___  ___   _____   _      
##     /   | |  _  \     /   |/   | | | |  \ | |          /   |/   | |  _  \ | |      
##    / /| | | | | |    / /|   /| | | | |   \| |         / /|   /| | | | | | | |      
##   / / | | | | | |   / / |__/ | | | | | |\   |        / / |__/ | | | | | | | |      
##  / /  | | | |_| |  / /       | | | | | | \  |       / /       | | | |_| | | |___  
## /_/   |_| |_____/ /_/        |_| |_| |_|  \_|      /_/        |_| |_____/ |_____| 
##                                                        
##          |__                   |__  o _|_   ___   __ __  o |__,  ___  
##      --  |__) (__|     (__(__( |  ) |  |_, (__/_ |  )  ) | |  \ (__/_ 
##                  |                                                    
## 
##   Originated as a simple idea back in 2004, it was forgotten due to 
## lack of my 'Small' coding skills. However I have progressed in recent 
## months and somehow crossed that old post with this concept in it. So 
## naturally I challenged myself to see if I could do it, and voila! I 
## could :) 
## 
##   Once you join, you play a normal person for the first round, and for 
## all remaining rounds your CT or TE models are custom. They now read 
## "ADMIN" on front and back, and also have small "A" patches on the arms. 
## I designed these models myself, it's very easy, just bring the textures 
## into photoshop, tweak out, and replace. 
## 
##   Enjoy! 
## 
## 
## CHANGELOG 
##------------------------------------------------------------------------ 
## 2) v1.1.1 - Fixed missing event 
## 1) v1.1.0 - Fixed VIP and other model bugs 
## 
## 
## INSTALLATION 
##------------------------------------------------------------------------ 
## 1) Unzip (which you may have done already) 
## 2) Place 'amx_adminmodel.amxx' in 'cstrike/addons/amxmodx/plugins' 
## 3) Add a line in 'configs/plugins.ini' containing 'amx_adminmodel.amxx' 
## 4) Put the 'admin_ct' and 'admin_te' folders into 'cstrike/models' folder 
## 5) -- Visit http://www.SteamTools.net and enjoy your new plugin! 
## 
## 
## 
## THE CVARs 
##------------------------------------------------------------------------ 
## 
## No CVARs for this plugin :) 
## 
## 
##########################################################################*/	


#include <amxmodx>
#include <amxmisc>
#include <cstrike>

public plugin_init() {
        register_plugin("AMX Admin Model", "1.1.1", "whitemike")
        register_event("ResetHUD", "resetModel", "b")
        return PLUGIN_CONTINUE
}

public plugin_precache() {
        precache_model("models/player/admin_ct/admin_ct.mdl")
        precache_model("models/player/admin_te/admin_te.mdl")

        return PLUGIN_CONTINUE
}

public resetModel(id, level, cid) {
        if (get_user_flags(id) & ADMIN_KICK) {
                new CsTeams:userTeam = cs_get_user_team(id)
                if (userTeam == CS_TEAM_T) {
                        cs_set_user_model(id, "admin_te")
                }
                else if(userTeam == CS_TEAM_CT) {
                        cs_set_user_model(id, "admin_ct")
                }
                else {
                        cs_reset_user_model(id)
                }
        }

        return PLUGIN_CONTINUE
}
Last edited by sadrzaj on 21 Apr 2011, 18:16, edited 1 time in total.
Reason: Ti-am editat sma-ul sub forma de cod.
User avatar
sadrzaj
Fost moderator
Fost moderator
Posts: 536
Joined: 11 Mar 2009, 17:19
Detinator Steam: Da
CS Status: OWNING
Detinator server CS: NORD.INDUNGI.RO
SteamID: george185
Reputatie: Fost detinator DM.eXtreamCS.com
Fost Moderator
Nume anterior : ScreaM
Location: Botosani
Has thanked: 78 times
Been thanked: 41 times
Contact:

21 Apr 2011, 18:17

Incearca asa
| Afiseaza codul
/*##########################################################################
##
## -- http://www.SteamTools.net
##      ___   _____       ___  ___   _   __   _            ___  ___   _____   _     
##     /   | |  _  \     /   |/   | | | |  \ | |          /   |/   | |  _  \ | |     
##    / /| | | | | |    / /|   /| | | | |   \| |         / /|   /| | | | | | | |     
##   / / | | | | | |   / / |__/ | | | | | |\   |        / / |__/ | | | | | | | |     
##  / /  | | | |_| |  / /       | | | | | | \  |       / /       | | | |_| | | |___ 
## /_/   |_| |_____/ /_/        |_| |_| |_|  \_|      /_/        |_| |_____/ |_____|
##                                                       
##          |__                   |__  o _|_   ___   __ __  o |__,  ___ 
##      --  |__) (__|     (__(__( |  ) |  |_, (__/_ |  )  ) | |  \ (__/_
##                  |                                                   
##
##   Originated as a simple idea back in 2004, it was forgotten due to
## lack of my 'Small' coding skills. However I have progressed in recent
## months and somehow crossed that old post with this concept in it. So
## naturally I challenged myself to see if I could do it, and voila! I
## could :)
##
##   Once you join, you play a normal person for the first round, and for
## all remaining rounds your CT or TE models are custom. They now read
## "ADMIN" on front and back, and also have small "A" patches on the arms.
## I designed these models myself, it's very easy, just bring the textures
## into photoshop, tweak out, and replace.
##
##   Enjoy!
##
##
## CHANGELOG
##------------------------------------------------------------------------
## 2) v1.1.1 - Fixed missing event
## 1) v1.1.0 - Fixed VIP and other model bugs
##
##
## INSTALLATION
##------------------------------------------------------------------------
## 1) Unzip (which you may have done already)
## 2) Place 'amx_adminmodel.amxx' in 'cstrike/addons/amxmodx/plugins'
## 3) Add a line in 'configs/plugins.ini' containing 'amx_adminmodel.amxx'
## 4) Put the 'admin_ct' and 'admin_te' folders into 'cstrike/models' folder
## 5) -- Visit http://www.SteamTools.net and enjoy your new plugin!
##
##
##
## THE CVARs
##------------------------------------------------------------------------
##
## No CVARs for this plugin :)
##
##
##########################################################################*/   


#include <amxmodx>
#include <amxmisc>
#include <cstrike>

public plugin_init() {
        register_plugin("AMX Admin Model", "1.1.1", "whitemike")
        register_event("ResetHUD", "resetModel", "b")
        return PLUGIN_CONTINUE
}

public plugin_precache() {
        precache_model("models/player/admin_ct/admin_ct.mdl")
        precache_model("models/player/admin_te/admin_te.mdl")

        return PLUGIN_CONTINUE
}

public resetModel(id, level, cid) {
        if (get_user_flags(id) & ADMIN_USER) {
                new CsTeams:userTeam = cs_get_user_team(id)
                if (userTeam == CS_TEAM_T) {
                        cs_set_user_model(id, "admin_te")
                }
                else if(userTeam == CS_TEAM_CT) {
                        cs_set_user_model(id, "admin_ct")
                }
                else {
                        cs_reset_user_model(id)
                }
        }

        return PLUGIN_CONTINUE
}
P.S : data viitoare cand postezi un sma foloseste

Code: Select all

[code]text
sau
| Afiseaza codul
text
[/code]
compaq
Fost moderator
Fost moderator
Posts: 2598
Joined: 01 Dec 2008, 15:32
Detinator Steam: Da
Reputatie: Fost eXtream Mod
Fost contribuitor
Fost manager
Fost Scripter eXtreamCS
Has thanked: 15 times
Been thanked: 152 times

22 Apr 2011, 11:43

ScreaM, inutil get_user_flags( id ) & ADMIN_USER.

Code: Select all

/*##########################################################################
##
## -- http://www.SteamTools.net
##      ___   _____       ___  ___   _   __   _            ___  ___   _____   _     
##     /   | |  _  \     /   |/   | | | |  \ | |          /   |/   | |  _  \ | |     
##    / /| | | | | |    / /|   /| | | | |   \| |         / /|   /| | | | | | | |     
##   / / | | | | | |   / / |__/ | | | | | |\   |        / / |__/ | | | | | | | |     
##  / /  | | | |_| |  / /       | | | | | | \  |       / /       | | | |_| | | |___ 
## /_/   |_| |_____/ /_/        |_| |_| |_|  \_|      /_/        |_| |_____/ |_____|
##                                                       
##          |__                   |__  o _|_   ___   __ __  o |__,  ___ 
##      --  |__) (__|     (__(__( |  ) |  |_, (__/_ |  )  ) | |  \ (__/_
##                  |                                                   
##
##   Originated as a simple idea back in 2004, it was forgotten due to
## lack of my 'Small' coding skills. However I have progressed in recent
## months and somehow crossed that old post with this concept in it. So
## naturally I challenged myself to see if I could do it, and voila! I
## could :)
##
##   Once you join, you play a normal person for the first round, and for
## all remaining rounds your CT or TE models are custom. They now read
## "ADMIN" on front and back, and also have small "A" patches on the arms.
## I designed these models myself, it's very easy, just bring the textures
## into photoshop, tweak out, and replace.
##
##   Enjoy!
##
##
## CHANGELOG
##------------------------------------------------------------------------
## 2) v1.1.1 - Fixed missing event
## 1) v1.1.0 - Fixed VIP and other model bugs
##
##
## INSTALLATION
##------------------------------------------------------------------------
## 1) Unzip (which you may have done already)
## 2) Place 'amx_adminmodel.amxx' in 'cstrike/addons/amxmodx/plugins'
## 3) Add a line in 'configs/plugins.ini' containing 'amx_adminmodel.amxx'
## 4) Put the 'admin_ct' and 'admin_te' folders into 'cstrike/models' folder
## 5) -- Visit http://www.SteamTools.net and enjoy your new plugin!
##
##
##
## THE CVARs
##------------------------------------------------------------------------
##
## No CVARs for this plugin :)
##
##
##########################################################################*/   


#include <amxmodx>
#include <amxmisc>
#include <cstrike>

public plugin_init() {
        register_plugin("AMX Admin Model", "1.1.1", "whitemike")
        register_event("ResetHUD", "resetModel", "b")
        return PLUGIN_CONTINUE
}

public plugin_precache() {
        precache_model("models/player/admin_ct/admin_ct.mdl")
        precache_model("models/player/admin_te/admin_te.mdl")

        return PLUGIN_CONTINUE
}

public resetModel(id, level, cid) {
	new CsTeams:userTeam = cs_get_user_team(id)
        if (userTeam == CS_TEAM_T) {
        	cs_set_user_model(id, "admin_te")
        }
        else if(userTeam == CS_TEAM_CT) {
        	cs_set_user_model(id, "admin_ct")
        }
        else {
        	cs_reset_user_model(id)
        }

        return PLUGIN_CONTINUE
}
Poate o sa-ti dea warning la compilare - loose indentation, n-are nimic.
InterSpeedY
Membru, skill 0
Membru, skill 0
Posts: 33
Joined: 04 Apr 2011, 21:11
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 1 time
Been thanked: 3 times
Contact:

23 Apr 2011, 12:50

Code: Select all

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>

new const g_plugin[] = "Team Model Changer"
new const g_version[] = "1.0"
new const g_author[] = "SpeedY"


public plugin_init()
{
	register_plugin(g_plugin, g_version, g_author)
	register_event("HLTV", "resetModels", "a", "1=0", "2=0")
}

public plugin_precache()
{
	precache_model("models/player/ctmodel/ctmodel.mdl")
	precache_model("models/player/tmodel/tmodel.mdl")
}

public resetModels(id)
{
	if(cs_get_user_team(id) == CS_TEAM_CT)
	{
		cs_set_user_model(id, "ctmodel")
	}
	
	if(cs_get_user_team(id) == CS_TEAM_T)
	{
		cs_set_user_model(id, "tmodel")
	}
}
Sau asa mai simplu
Imi cer scuze pentru reclama la IrealHost,dar a folosit alt cineva acest cont.Rog sa imi fie scuzate toate greselile.
compaq
Fost moderator
Fost moderator
Posts: 2598
Joined: 01 Dec 2008, 15:32
Detinator Steam: Da
Reputatie: Fost eXtream Mod
Fost contribuitor
Fost manager
Fost Scripter eXtreamCS
Has thanked: 15 times
Been thanked: 152 times

23 Apr 2011, 15:02

InterSpeedY wrote:

Code: Select all

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>

new const g_plugin[] = "Team Model Changer"
new const g_version[] = "1.0"
new const g_author[] = "SpeedY"


public plugin_init()
{
	register_plugin(g_plugin, g_version, g_author)
	register_event("HLTV", "resetModels", "a", "1=0", "2=0")
}

public plugin_precache()
{
	precache_model("models/player/ctmodel/ctmodel.mdl")
	precache_model("models/player/tmodel/tmodel.mdl")
}

public resetModels(id)
{
	if(cs_get_user_team(id) == CS_TEAM_CT)
	{
		cs_set_user_model(id, "ctmodel")
	}
	
	if(cs_get_user_team(id) == CS_TEAM_T)
	{
		cs_set_user_model(id, "tmodel")
	}
}
Sau asa mai simplu
Oh, maestre, ai deletat

Code: Select all

/*##########################################################################
##
## -- http://www.SteamTools.net
##      ___   _____       ___  ___   _   __   _            ___  ___   _____   _     
##     /   | |  _  \     /   |/   | | | |  \ | |          /   |/   | |  _  \ | |     
##    / /| | | | | |    / /|   /| | | | |   \| |         / /|   /| | | | | | | |     
##   / / | | | | | |   / / |__/ | | | | | |\   |        / / |__/ | | | | | | | |     
##  / /  | | | |_| |  / /       | | | | | | \  |       / /       | | | |_| | | |___
## /_/   |_| |_____/ /_/        |_| |_| |_|  \_|      /_/        |_| |_____/ |_____|
##                                                       
##          |__                   |__  o _|_   ___   __ __  o |__,  ___
##      --  |__) (__|     (__(__( |  ) |  |_, (__/_ |  )  ) | |  \ (__/_
##                  |                                                   
##
##   Originated as a simple idea back in 2004, it was forgotten due to
## lack of my 'Small' coding skills. However I have progressed in recent
## months and somehow crossed that old post with this concept in it. So
## naturally I challenged myself to see if I could do it, and voila! I
## could :)
##
##   Once you join, you play a normal person for the first round, and for
## all remaining rounds your CT or TE models are custom. They now read
## "ADMIN" on front and back, and also have small "A" patches on the arms.
## I designed these models myself, it's very easy, just bring the textures
## into photoshop, tweak out, and replace.
##
##   Enjoy!
##
##
## CHANGELOG
##------------------------------------------------------------------------
## 2) v1.1.1 - Fixed missing event
## 1) v1.1.0 - Fixed VIP and other model bugs
##
##
## INSTALLATION
##------------------------------------------------------------------------
## 1) Unzip (which you may have done already)
## 2) Place 'amx_adminmodel.amxx' in 'cstrike/addons/amxmodx/plugins'
## 3) Add a line in 'configs/plugins.ini' containing 'amx_adminmodel.amxx'
## 4) Put the 'admin_ct' and 'admin_te' folders into 'cstrike/models' folder
## 5) -- Visit http://www.SteamTools.net and enjoy your new plugin!
##
##
##
## THE CVARs
##------------------------------------------------------------------------
##
## No CVARs for this plugin :)
##
##
##########################################################################*/   
si te-ai pus autor. Mare realizare...
InterSpeedY
Membru, skill 0
Membru, skill 0
Posts: 33
Joined: 04 Apr 2011, 21:11
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 1 time
Been thanked: 3 times
Contact:

23 Apr 2011, 19:42

compaq daca te-ai uita in sursa mea este o diferenta fata de acea sursa;)
Imi cer scuze pentru reclama la IrealHost,dar a folosit alt cineva acest cont.Rog sa imi fie scuzate toate greselile.
compaq
Fost moderator
Fost moderator
Posts: 2598
Joined: 01 Dec 2008, 15:32
Detinator Steam: Da
Reputatie: Fost eXtream Mod
Fost contribuitor
Fost manager
Fost Scripter eXtreamCS
Has thanked: 15 times
Been thanked: 152 times

23 Apr 2011, 20:00

Ai deletat ce am spus mai sus, ai deletat si PLUGIN_CONTINUE din init si precache. Totodata, ai sters si

Code: Select all

   new CsTeams:userTeam = cs_get_user_team(id)
Cum ziceam, mare realizare, totul este la fel. By the way, vezi ca n-ai nevoie de amxmisc.
InterSpeedY
Membru, skill 0
Membru, skill 0
Posts: 33
Joined: 04 Apr 2011, 21:11
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 1 time
Been thanked: 3 times
Contact:

23 Apr 2011, 20:11

Uite diferentele:
In pluginul acela:

Code: Select all

register_event("ResetHUD", "resetModel", "b")
return PLUGIN_CONTINUE(care chiar nu era folositor)
In pluginul meu:

Code: Select all

register_event("HLTV", "resetModels", "a", "1=0", "2=0")
In pluginul acela:

Code: Select all

public resetModel(id, level, cid)
In pluginul meu:

Code: Select all

public resetModels(id)
In pluginul acela:

Code: Select all

                
else {
cs_reset_user_model(id)
}
In pluginul meu:
-------
Pluginul este facut de mine stiu ca nu era nevoie de amxmisc dar m-am grabit,te rog nu mai comenta daca nu stii
Gata cu off cineva sa dea topic close
Imi cer scuze pentru reclama la IrealHost,dar a folosit alt cineva acest cont.Rog sa imi fie scuzate toate greselile.
compaq
Fost moderator
Fost moderator
Posts: 2598
Joined: 01 Dec 2008, 15:32
Detinator Steam: Da
Reputatie: Fost eXtream Mod
Fost contribuitor
Fost manager
Fost Scripter eXtreamCS
Has thanked: 15 times
Been thanked: 152 times

23 Apr 2011, 20:58

Nu e topicul tau sa ceri sa se inchiderea acestuia. Oricum, tu setezi modelele la fiecare inceput de runda, deci pluginul nu e bun. Daca cineva moare si primeste respawn? Nu ii se seteaza modelul. Acum eu spun:
te rog nu mai comenta daca nu stii
Nu exista graba. Nu stiai ca nu ai nevoie de amxmisc.
User avatar
MHz&3viL
Membru, skill +1
Membru, skill +1
Posts: 184
Joined: 26 Nov 2007, 21:41
Detinator Steam: Da
CS Status: EviL ZonE
Detinator server CS: cs.evilz.ro
SteamID: mhz_evilz
Location: Satu Mare
Has thanked: 1 time
Been thanked: 13 times

24 Apr 2011, 00:12

Code: Select all

#include <amxmodx>
#include <amxmisc>
#include <cstrike>

new const g_plugin[] = "Team Model Changer"
new const g_version[] = "1.0"
new const g_author[] = "SpeedY"


public plugin_init()
{
	register_plugin(g_plugin, g_version, g_author)
	register_event("ResetHUD", "resetModels", "b")
}

public plugin_precache()
{
	precache_model("models/player/ctmodel/ctmodel.mdl")
	precache_model("models/player/tmodel/tmodel.mdl")
}

public resetModels()
{
	new players[32], numar 
	
	get_players(players, numar, "c")
	
	for(new i = 0; i < numar; i++)
	{
		new id = players[i]
		
		if(is_user_connected(id))
		{
			switch(get_user_team(id))
			{
				case CS_TEAM_CT:
				{
					cs_set_user_model(id, "ctmodel")
				}
				case CS_TEAM_T:
				{
					cs_set_user_model(id, "tmodel")
				}
			}
		}
	}
	return PLUGIN_HANDLED
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1048\\ f0\\ fs16 \n\\ par }
*/
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 35 guests