[HELP] Coding Change Player Model

Chat area specifically for CoDJumper

Moderator: Core Staff

Post Reply
paintlax21
CJ Donator
CJ Donator
Posts: 52
Joined: August 10th, 2009, 5:20 pm

[HELP] Coding Change Player Model

Post by paintlax21 » June 15th, 2010, 7:38 pm

So as some of you may know there is a comman punish which uses give, kill, spec, flash, etc. Well I am trying to code something that when you type punish toilet::#::argument and when the argument is 1 the corresponding player's model because a toilet and when it is 0 it goes back to normal. Can someone help me figure this out. My xfire is paintlax21

User avatar
Soviet
Core Staff
Core Staff
Posts: 7762
Joined: April 23rd, 2005, 9:12 pm

Re: [HELP] Coding Change Player Model

Post by Soviet » June 16th, 2010, 5:08 am

Code: Select all

toilet(id)
{
	players = getentarray("player", "classname");
	for(i=0;i<players.size;i++)
	{
		tempid = "" + players[i] getEntityNumber();
		if(tempid == id && players[i].cj["status"] < 1)
			players[i] SetModel("toilet model name");
	}
}

paintlax21
CJ Donator
CJ Donator
Posts: 52
Joined: August 10th, 2009, 5:20 pm

Re: [HELP] Coding Change Player Model

Post by paintlax21 » June 17th, 2010, 6:20 am

Soviet wrote:

Code: Select all

toilet(id)
{
	players = getentarray("player", "classname");
	for(i=0;i<players.size;i++)
	{
		tempid = "" + players[i] getEntityNumber();
		if(tempid == id && players[i].cj["status"] < 1)
			players[i] SetModel("toilet model name");
	}
}
doesnt work i added you on xfire to talk about it

User avatar
Soviet
Core Staff
Core Staff
Posts: 7762
Joined: April 23rd, 2005, 9:12 pm

Re: [HELP] Coding Change Player Model

Post by Soviet » June 17th, 2010, 6:28 am

I'm not going to help you any further, in fact in retrospect I shouldn't have even helped you as much as I did. That code will not work without the source code to the CJ mod which has only been given to a select few people. We don't condone people altering or stealing our code without permission.

User avatar
waywaaaard
Core Staff
Core Staff
Posts: 2214
Joined: February 6th, 2006, 3:18 pm
Location: Germany/Bayern

Re: [HELP] Coding Change Player Model

Post by waywaaaard » June 17th, 2010, 11:34 am

Wise Yoda says: To precache you have!
THAT HANDS WERE NOT TRACED!
visit my blog: Link
Soviet wrote:Yeah, watch out, Peds will hit you with his +5 D-Battleaxe of homosexuality :roll:

User avatar
Uzumakibro93
CJ Newbie
CJ Newbie
Posts: 61
Joined: April 6th, 2010, 11:56 pm
PSN ID: uzumakibro93
Location: Simpsonville, South Carolina
Contact:

Re: [HELP] Coding Change Player Model

Post by Uzumakibro93 » June 23rd, 2010, 5:42 am

I have a code that allows punishments to be distributed using rcon codes (example /rconpassword xxx, /rcon set toilet (ID/ALL/ALLIES/AXIS), and more) but I am not sure if this would be pertinent to what you want, and I am not sure if CoDJumper has caught you stealing mods before... Soviet, were you just being cautious? If so, I can provide an admin command modification I made along with Number 7's original Codes, only if he was not under suspicion of stealing mods, though.
Image

I've worked until I have been driven insane. And then I kept working. The only thing I need to know is, exactly who are those people talking to me in my head? And why do they want me to kill you?

User avatar
Soviet
Core Staff
Core Staff
Posts: 7762
Joined: April 23rd, 2005, 9:12 pm

Re: [HELP] Coding Change Player Model

Post by Soviet » June 23rd, 2010, 6:01 am

I'm not taking any specific action, I'm simply refraining from taking any action at this point. It's just a possibility, nothing more, and as such until/if it is resolved CoDJumper.com won't be available as an outlet for his issues concerning what could theoretically be a ripped copy of our mod. CoDJumper's official stance on decompiling our mod is clear, and as such we won't take actions that would in any way remotely imply we condone such attempts.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 2 guests