Im trying to take a command from Fai CP (The Impersonate Player Command) and add it to JJCP. I've tried to do it myself but it does not work. This is the part i copied from FAI CP. So can someone please help me.
Edit: If its possible also help me change the &ip.* command to something more easier like -ip <player number> <num chat string>
Edit 2: The globals i just coppied these: "vfai_col7" and "vfai_ahbee".
function iPs7 takes player vfai_p7,string vfai_s7 returns nothing
local integer vfai_pp7=GetPlayerId(vfai_p7)
local integer vfai_h25h=vfai_pp7+25
local trigger vfai_ipt7=CreateTrigger()
local integer vfai_z7
local integer vfai_yf7
local integer vfai_el7
local string vfai_p7n
local boolean vfai_nL7=false
local conditionfunc vfai_cfi5
local triggercondition vfai_tci5
if SubString(vfai_s7,2,3)=="."then
set vfai_yf7=1
set vfai_z7=S7S(SubString(vfai_s7,3,4))
elseif SubString(vfai_s7,3,4)=="."then
set vfai_yf7=S2I(SubString(vfai_s7,0,1))
set vfai_z7=S7S(SubString(vfai_s7,4,5))
endif
if(vfai_z7<1)or(vfai_z7>16)then
call DestroyTrigger(vfai_ipt7)
else
set vfai_cfi5=Condition(function Mr7Yes)
set vfai_tci5=TriggerAddCondition(vfai_ipt7,vfai_cfi5)
call TriggerRegisterPlayerChatEvent(vfai_ipt7,vfai_p7,"",vfai_nL7)
if vfai_ahbee[vfai_h25h]<1then
set vfai_col7[vfai_pp7]=GetPlayerName(vfai_p7)
set vfai_ahbee[vfai_h25h]=0
endif
set vfai_ahbee[vfai_h25h]=vfai_ahbee[vfai_h25h]+1
if vfai_z7-1==vfai_pp7 then
call SetPlayerName(vfai_p7,vfai_col7[vfai_pp7])
else
set vfai_p7n=GetPlayerName(Player(vfai_z7-1))
call SetPlayerName(vfai_p7,vfai_p7n)
endif
call SetPlayerColor(vfai_p7,ConvertPlayerColor(vfai_z7-1))
set vfai_el7=vfai_ahbee[vfai_h25h]
loop
call TriggerSleepAction(1.00)
set vfai_nL7=GetTriggerExecCount(vfai_ipt7)>=vfai_yf7 or vfai_el7<vfai_ahbee[vfai_h25h]
exitwhen vfai_nL7
endloop
if not(vfai_ahbee[vfai_h25h]>1)then
call SetPlayerName(vfai_p7,vfai_col7[vfai_pp7])
call SetPlayerColor(vfai_p7,ConvertPlayerColor(vfai_pp7))
endif
set vfai_ahbee[vfai_pp7+25]=vfai_ahbee[vfai_pp7+25]-1
call DisplayTimedTextToPlayer(vfai_p7,0,0.25,4,"|c0000FFFFip.|r |c00C0C0C0--->|r |c008080FFoff|r")
call DisableTrigger(vfai_ipt7)
call TriggerRemoveCondition(vfai_ipt7,vfai_tci5)
call DestroyCondition(vfai_cfi5)
call DestroyTrigger(vfai_ipt7)
endif
set vfai_tci5=null
set vfai_cfi5=null
set vfai_ipt7=null
endfunction
Last edited by nafre on December 16th, 2011, 3:08 pm, edited 1 time in total.
Without reading the entire function, have you added a command to call that function with the right parameters (as you can see it doens't take nothing..)
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).
(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:
(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.
(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).
haxorico wrote:Without reading the entire function, have you added a command to call that function with the right parameters (as you can see it doens't take nothing..)
Im sorry but i didnt understand what u just wrote.
I got a feeling you don't know simple jass by that answer. Just copy-pasta wont give you anything.
Lets ask a simpler questiom shall we?
What did you do BESIDES pasting that function.
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).
(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:
(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.
(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).
Oh The globals i just coppied these: "vfai_col7" and "vfai_ahbee". And i dont know how to combine it with JJCP and change the activator to something like "-ip <player number> <num chat string>". I forgot to place this in the main post.
so you just copy/pasted from faicp...
do a search for jjxtra by yellowafterlife.
I believe it has the impersonate command.
If you have any questions drop in by chat sometime, chances are there'll be someone who can help you that's afking there, so the next best thing is to click the link on UndeadxAssassin's Sig and ask your question there.
If you have any questions drop in by chat sometime, chances are there'll be someone who can help you that's afking there, so the next best thing is to click the link on UndeadxAssassin's Sig and ask your question there.