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

[CS:GO] Replace all chickens


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Brrdy
Senior Member
Join Date: Feb 2015
Old 03-09-2015 , 12:01   [CS:GO] Replace all chickens
Reply With Quote #1

Code:
    new elchicken;
    elchicken = GetEntPropEnt(chicken, Prop_Send, "models/chicken/chicken.mdl");
	PrintToServer("Let There Be Life!");
	SetEntityModel(elchicken, "models/player/ctm_sas_variantA.mdl");
I cant get it to work
Also I have tried SetEntityModel(chicken, "models/player/ctm_sas_variantA.mdl");
Brrdy is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 03-09-2015 , 13:18   Re: [CS:GO] Replace all chickens
Reply With Quote #2

elchicken = GetEntPropEnt(chicken, Prop_Send, "models/chicken/chicken.mdl");
wut... you should do some reading of what GetEntProp actually does..
Use FindEntityByClassname
Mitchell is offline
Brrdy
Senior Member
Join Date: Feb 2015
Old 03-09-2015 , 13:30   Re: [CS:GO] Replace all chickens
Reply With Quote #3

Quote:
Originally Posted by Mitchell View Post
elchicken = GetEntPropEnt(chicken, Prop_Send, "models/chicken/chicken.mdl");
wut... you should do some reading of what GetEntProp actually does..
Use FindEntityByClassname
Sorry Im not at my house haha thank you Mitchell <3
Brrdy is offline
Brrdy
Senior Member
Join Date: Feb 2015
Old 03-09-2015 , 13:46   Re: [CS:GO] Replace all chickens
Reply With Quote #4

FindEntityByClassname(startEnt, const String:classname[]); is the format so

elchicken = FindEntityByClassname(elchicken, chicken);

Or do I have to do something else?

Last edited by Brrdy; 03-09-2015 at 13:50.
Brrdy is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-09-2015 , 14:10   Re: [CS:GO] Replace all chickens
Reply With Quote #5

You have to use that function to loop through all chicken entities.
Also, you need to specify quotes around the classname since it is a string, unless you have a variable chicken holding that string of "chicken".

Anyway, here is an example:
Code:
new entity = -1; while ((entity = FindEntityByClassName(entity, "chicken")) > 0) {     // Do something with entity }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Brrdy
Senior Member
Join Date: Feb 2015
Old 03-09-2015 , 14:13   Re: [CS:GO] Replace all chickens
Reply With Quote #6

Quote:
Originally Posted by Exolent[jNr] View Post
You have to use that function to loop through all chicken entities.
Also, you need to specify quotes around the classname since it is a string, unless you have a variable chicken holding that string of "chicken".

Anyway, here is an example:
Code:
new entity = -1; while ((entity = FindEntityByClassName(entity, "chicken")) > 0) {     // Do something with entity }
Aww I see okay thank you Ill make sure to comment you in if you want
__________________
Need help with something regarding your plugin? Or want a new plugin made? For free!!?!?!?!??!? Click HERE! I will do nearly any request <3 If I post in scripting and I resolve and don't post how just shoot me a pm linking me the thread and I will update
Brrdy is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-09-2015 , 14:15   Re: [CS:GO] Replace all chickens
Reply With Quote #7

Quote:
Originally Posted by Brrdy View Post
Aww I see okay thank you Ill make sure to comment you in if you want
I do not require any credits. Just helping a fellow coder get better at scripting.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Brrdy
Senior Member
Join Date: Feb 2015
Old 03-09-2015 , 14:17   Re: [CS:GO] Replace all chickens
Reply With Quote #8

Quote:
Originally Posted by Exolent[jNr] View Post
I do not require any credits. Just helping a fellow coder get better at scripting.
Thank you ^_^ Surprisingly this is like the first thing I literally got stuck on I had an easier time working on super super hard velocity offset stuff xD
I guess it's just a brain fart
__________________
Need help with something regarding your plugin? Or want a new plugin made? For free!!?!?!?!??!? Click HERE! I will do nearly any request <3 If I post in scripting and I resolve and don't post how just shoot me a pm linking me the thread and I will update
Brrdy is offline
Mathias.
Veteran Member
Join Date: Aug 2010
Location: Canada is my city
Old 03-09-2015 , 20:55   Re: [CS:GO] Replace all chickens
Reply With Quote #9

glow chicken snippet
PHP Code:
public void OnEntityCreated(int entity, const char[] classname)
{
    if (
StrEqual(classname"chicken"false))
        
SDKHook(entitySDKHook_SpawnPostOnChickenSpawn);
}

public 
void OnChickenSpawn(int entity)
{
    
SetEntProp(entityProp_Send"m_bShouldGlow"true1);

Mathias. 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 23:03.


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