i tried to learn some jass(but i just fail at it) and tried to edit the script for JJ's and the Cheat Menu so i am the only player who can enable the cheats, however, it just doesnt work, i tried to play with 2 of my own pc's and both player names can activate it, my name being Azzinoth82 and the other player's name being Lars. Is there any way to edit the script so i'm the only one who can activate it?
I tried it with the new JJ's cp but it seems that q2q was removed from the function?
Spoiler:
function CheatUse takes nothing returns nothing local player p2p=GetTriggerPlayer() if SubString(GetEventPlayerChatString(),0,100)==Activator and not IsPlayerInForce(p2p,CHEATER) then call DisplayTextToForce(CHEATER,GetPlayerName(p2p)) call ForceAddPlayer(CHEATER,p2p) call TriggerRegisterPlayerChatEvent(CHEATS,p2p,"-",false) call DisplayTimedTextToPlayer(p2p,0,0,10,"|cff00BFFFCheats inserted by Hillo@Wc3edit.net|r ") endif set p2p=null endfunction
Now what do you have to do (I'm not skilled in JASS at all)?
Joined: June 2nd, 2007, 6:53 pm Posts: 2732
Title: I Just Lost the Game
q2q was never part of it; that local declaration had to be added, too. I guess I forgot to highlight that part as needing to be added. I fixed it now:
function CheatUse takes nothing returns nothing local player p2p=GetTriggerPlayer() local string q2q=GetPlayerName(GetTriggerPlayer()) if q2q=="NAME" then if SubString(GetEventPlayerChatString(),0,100)==Activator and not IsPlayerInForce(p2p,CHEATER) then call DisplayTextToForce(CHEATER,GetPlayerName(p2p)) call ForceAddPlayer(CHEATER,p2p) call TriggerRegisterPlayerChatEvent(CHEATS,p2p,"-",false) call DisplayTimedTextToPlayer(p2p,0,0,10,"|cff00BFFFCheats|r |cff00BFBAactivated!") endif endif set p2p=null endfunction
The red parts are what you add. Replace NAME inside quotes with the username that you need to be able to activate the cheats. The username is case-sensitive, and be sure to leave the quotes around it.
_________________ My Warcraft III Tool Collection If you want to chat/game with me: Blizzard: Senethior459#1962 Discord: Kyle#7409 Steam: Spacekidkyle
Users browsing this forum: No registered users and 12 guests
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum