Calling a function once only

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

User avatar
haxorico
Super Moderator
Posts: 3195
Joined: February 24th, 2009, 1:31 pm
Location: JEW LAND
Been thanked: 1 time

Calling a function once only

Post by haxorico »

In JJ's CP there is the command -hear. that shows you what everyone is writing.
Now if 2 players write it. you see it 2/4 times.
Now I want to make it automticly work. So insted of udg_hear (the group that adds the player into so he can see the "hidden" chat) I changed it to CHEATER (so your automaticly inside this player group when you activate cheats) and I placed "Call (Talk)" (the function that enables the "hidden" chat to be "reveald"). Tho again when my friend activates the cheats. We see everything everyone write x2/4 times.

So is there a way to call the Talk function once? and ONLY once?
Image
Spoiler:
(02:24:09)

Code: Select all

ChatBot: FatherSpace logs into the Chat.
(02:24:28) Lanaya: Gtfo ken.
(02:24:33) ChatBot: FatherSpace logs out of the Chat.
(02:24:40) Lanaya: Thought so. bitch.
(02:24:44) ChatBot: FatherSpace logs into the Chat.
(02:24:48) FatherSpace: Can I come back yet?
(02:24:51) Lanaya: What'd i say earlier.
(02:24:51) Lanaya: No.
(02:24:58) FatherSpace: Let's try this...
(02:25:01) ChatBot: Lanaya has been logged out (Kicked).

Code: Select all


(14:33:51) 2Pac: Do you know what'S so funny?
(14:34:01) Lanaya: No, please show me.
(14:34:07) 2Pac: This.
(14:34:09) ChatBot: Lanaya has been logged out (Kicked).
(14:34:10) 2Pac: 

Code: Select all

(14:35:59) haxorico: No one will belive me if I say "I got this song from 2pac on MSN" lolz ^^
(14:36:02) Lanaya: lolz.
(14:36:16) 2Pac: I AIN'T DEAD FFS.
(14:36:26) 2Pac: I'm a living legend, y'now.
(14:37:17) haxorico: why is 2Pac a legend?
(14:37:28) Lanaya: He's the worse rapper evar.

Code: Select all

(15:42:51) Lanaya: can i suck , . . .

Code: Select all

(13:55:21) ChatBot: 2Pac rolls 1d100 and gets 1.
(13:55:21) ChatBot: haxorico rolls 1d2 and gets 2.
(13:55:27) haxorico: owned?

Code: Select all

GeorgeMots: xplain what happens in SP. Why cant you save?
dast.-:i need play with 2 players

Code: Select all

(21:53:08) (673237): plzplzplz, im sorry about before.
(21:53:26) FatherSpace: I'm sorry you were born.
(21:53:31) ChatBot: (673237) has been logged out (Kicked).

Code: Select all

(10:08:02) Bartimaeus: you do know run I youtube channel for my favorite music, right?
User avatar
Risen
Forum Staff
Posts: 811
Joined: January 1st, 2008, 12:58 am

Re: Calling a function once only

Post by Risen »

(From was I can decipher from this ancient block of text)

The globals are colliding, just make it into a group array like this.

Code: Select all

set udg_hear[1+GetTriggerPlayer()] = udg_hear[1+GetTriggerPlayer()] ....etc
Image
Wanna learn to hack maps? --> Guide
User avatar
haxorico
Super Moderator
Posts: 3195
Joined: February 24th, 2009, 1:31 pm
Location: JEW LAND
Been thanked: 1 time

Re: Calling a function once only

Post by haxorico »

Well I don't think that the force matters that much.
I just deleted udg_hear and replaced it with CHEATRZ (or how ever that cheaters group is called)
the problem is making "Call (Talk)" only be balled ONCE! and ONCE only
Image
Spoiler:
(02:24:09)

Code: Select all

ChatBot: FatherSpace logs into the Chat.
(02:24:28) Lanaya: Gtfo ken.
(02:24:33) ChatBot: FatherSpace logs out of the Chat.
(02:24:40) Lanaya: Thought so. bitch.
(02:24:44) ChatBot: FatherSpace logs into the Chat.
(02:24:48) FatherSpace: Can I come back yet?
(02:24:51) Lanaya: What'd i say earlier.
(02:24:51) Lanaya: No.
(02:24:58) FatherSpace: Let's try this...
(02:25:01) ChatBot: Lanaya has been logged out (Kicked).

Code: Select all


(14:33:51) 2Pac: Do you know what'S so funny?
(14:34:01) Lanaya: No, please show me.
(14:34:07) 2Pac: This.
(14:34:09) ChatBot: Lanaya has been logged out (Kicked).
(14:34:10) 2Pac: 

Code: Select all

(14:35:59) haxorico: No one will belive me if I say "I got this song from 2pac on MSN" lolz ^^
(14:36:02) Lanaya: lolz.
(14:36:16) 2Pac: I AIN'T DEAD FFS.
(14:36:26) 2Pac: I'm a living legend, y'now.
(14:37:17) haxorico: why is 2Pac a legend?
(14:37:28) Lanaya: He's the worse rapper evar.

Code: Select all

(15:42:51) Lanaya: can i suck , . . .

Code: Select all

(13:55:21) ChatBot: 2Pac rolls 1d100 and gets 1.
(13:55:21) ChatBot: haxorico rolls 1d2 and gets 2.
(13:55:27) haxorico: owned?

Code: Select all

GeorgeMots: xplain what happens in SP. Why cant you save?
dast.-:i need play with 2 players

Code: Select all

(21:53:08) (673237): plzplzplz, im sorry about before.
(21:53:26) FatherSpace: I'm sorry you were born.
(21:53:31) ChatBot: (673237) has been logged out (Kicked).

Code: Select all

(10:08:02) Bartimaeus: you do know run I youtube channel for my favorite music, right?
User avatar
Madara
Forum Fanatic
Posts: 311
Joined: October 26th, 2009, 10:22 pm
Title: mib^

Re: Calling a function once only

Post by Madara »

sometimes with JJ's cp when i do hear or whatever the command was

i saw 4 times the text! but only i activated cheats...

never figured out why it happens
Spoiler:
(06:05:25) UndeadxAssassin: SLANDER
(06:05:32) Bartimaeus: See you later, Undead. I miss talking to you. Message me once in a while, :<
(06:05:37) UndeadxAssassin: /quit Bartimaeus!
(06:05:40) ChatBot: Madara logs into the Chat.
(06:05:49) ChatBot: Madara has been logged out (Kicked).
(06:05:54) Bartimaeus: >>
(06:06:02) Bartimaeus: He doesn't deserve to see my good bye to you, :D
(06:06:23) UndeadxAssassin: I'm still here because I wanna see his response
(06:06:29) UndeadxAssassin: :D
(06:06:31) ChatBot: Madara logs into the Chat.
(06:06:31) Bartimaeus: Oh.
(06:06:35) Bartimaeus: lol
(06:06:43) Madara: So should i say something dramatic
(06:06:48) Madara: or what satisfies u ?
(06:06:48) Bartimaeus: Nope.
(06:06:50) Bartimaeus: Because nobody cares.
(06:06:52) Bartimaeus: :3
(06:06:57) UndeadxAssassin: What a let down
(06:06:58) UndeadxAssassin: I'm leaving.
naturesfury
Forum Spammer
Posts: 610
Joined: March 30th, 2009, 9:02 pm

Re: Calling a function once only

Post by naturesfury »

xDDD woot for necrooooo ^^
naw, jk.....i found this and saw it unanswered o.o so....jic anyone still needs it

Put the call talk() in the function main so its called only once, when the game is initialized
:DDD
User avatar
haxorico
Super Moderator
Posts: 3195
Joined: February 24th, 2009, 1:31 pm
Location: JEW LAND
Been thanked: 1 time

Re: Calling a function once only

Post by haxorico »

This question is kinda "last decade" dont you think? :P I asked this when I was a beginner, now I know like a thousend ways to do so.
But thanks for the answer I guess :D
Image
Spoiler:
(02:24:09)

Code: Select all

ChatBot: FatherSpace logs into the Chat.
(02:24:28) Lanaya: Gtfo ken.
(02:24:33) ChatBot: FatherSpace logs out of the Chat.
(02:24:40) Lanaya: Thought so. bitch.
(02:24:44) ChatBot: FatherSpace logs into the Chat.
(02:24:48) FatherSpace: Can I come back yet?
(02:24:51) Lanaya: What'd i say earlier.
(02:24:51) Lanaya: No.
(02:24:58) FatherSpace: Let's try this...
(02:25:01) ChatBot: Lanaya has been logged out (Kicked).

Code: Select all


(14:33:51) 2Pac: Do you know what'S so funny?
(14:34:01) Lanaya: No, please show me.
(14:34:07) 2Pac: This.
(14:34:09) ChatBot: Lanaya has been logged out (Kicked).
(14:34:10) 2Pac: 

Code: Select all

(14:35:59) haxorico: No one will belive me if I say "I got this song from 2pac on MSN" lolz ^^
(14:36:02) Lanaya: lolz.
(14:36:16) 2Pac: I AIN'T DEAD FFS.
(14:36:26) 2Pac: I'm a living legend, y'now.
(14:37:17) haxorico: why is 2Pac a legend?
(14:37:28) Lanaya: He's the worse rapper evar.

Code: Select all

(15:42:51) Lanaya: can i suck , . . .

Code: Select all

(13:55:21) ChatBot: 2Pac rolls 1d100 and gets 1.
(13:55:21) ChatBot: haxorico rolls 1d2 and gets 2.
(13:55:27) haxorico: owned?

Code: Select all

GeorgeMots: xplain what happens in SP. Why cant you save?
dast.-:i need play with 2 players

Code: Select all

(21:53:08) (673237): plzplzplz, im sorry about before.
(21:53:26) FatherSpace: I'm sorry you were born.
(21:53:31) ChatBot: (673237) has been logged out (Kicked).

Code: Select all

(10:08:02) Bartimaeus: you do know run I youtube channel for my favorite music, right?
naturesfury
Forum Spammer
Posts: 610
Joined: March 30th, 2009, 9:02 pm

Re: Calling a function once only

Post by naturesfury »

lol o.o a thousand dam....
i could only think of 5-6 >.<

neway....like i said.....for "anyone" that still needs it

never no o.o some random troll coulda wanted to know xP