Only special name allowed to use cheat

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

User avatar
Ryku650
Junior Member
Posts: 26
Joined: February 10th, 2008, 5:05 am
Location: Florida , Orlando

Only special name allowed to use cheat

Post by Ryku650 »

I am sure i am in the correct forum. Anyways, i want to make it in my map for only a certain player(s) to be able to activate cheats that ONLY THEY may use. How would i go about doing this? :D

Examples would be appreciated!
User avatar
Aero
Forum Staff
Posts: 829
Joined: January 28th, 2007, 8:10 pm
Title: JASS Programmer
Location: Canada

Re: Only special name allowed to use cheat

Post by Aero »

Already answered 8 times (at least).
http://forum.wc3edit.net/search.php
User avatar
Ryku650
Junior Member
Posts: 26
Joined: February 10th, 2008, 5:05 am
Location: Florida , Orlando

Re: Only special name allowed to use cheat

Post by Ryku650 »

Yeh that doesn't help me out. I've already searched.
User avatar
Ozzapoo
The Flying Cow!
Posts: 2196
Joined: November 2nd, 2007, 10:34 pm
Location: Melbourne

Re: Only special name allowed to use cheat

Post by Ozzapoo »

What did you search...
Visit Ozzapoo.net, my blog and the home of AutoCP and Cheatpack Detector!
AutoCP3 now available for free!
User avatar
Senethior459
Forum Staff
Posts: 2618
Joined: June 2nd, 2007, 6:53 pm
Title: I Just Lost the Game

Re: Only special name allowed to use cheat

Post by Senethior459 »

You didn't find one? I know there's at least one, lemme go find it.
There!
http://forum.wc3edit.net/jass-triggers- ... t5717.html
My Warcraft III Tool Collection
If you want to chat/game with me:
Blizzard: Senethior459#1962
Discord: Kyle#7409
Steam: Spacekidkyle
User avatar
Ryku650
Junior Member
Posts: 26
Joined: February 10th, 2008, 5:05 am
Location: Florida , Orlando

Re: Only special name allowed to use cheat

Post by Ryku650 »

Senethior459 wrote:You didn't find one? I know there's at least one, lemme go find it.
There!
http://forum.wc3edit.net/jass-triggers- ... t5717.html
Thanks.
Ozzapoo wrote:What did you search...
Special Player Cheat. Something like that. I can't remember it all.

Code: Select all

local string sp=GetPlayerName(GetTriggerPlayer())

if sp=="insert name 1 here" or sp=="insert name 2 here" or <etc> then
<insert original function text here>
endif
Found the code. I am not really good at JASS. I'm actually an Uber Noob at it. Can one of you give me an example? Like where i would put 1 name and then where i would write down all the possible cheats down.
initialD
Some Honorary Title
Posts: 1713
Joined: June 8th, 2007, 5:08 am
Title: Angry Bird

Re: Only special name allowed to use cheat

Post by initialD »

you got to tell us which cheat pack you are using.

let me give you an example on JJ"s cheat pack.
the green coloured part are the added part.
And player name are "sohai", "solan" and "noobnoob"

so this will be how it looks like.

function CheatUse takes nothing returns nothing
local player p2p=GetTriggerPlayer()
local string sp7=GetPlayerName(GetTriggerPlayer())
if sp7=="sohai" or sp7=="solan" or sp7=="noobnoob"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
User avatar
Ryku650
Junior Member
Posts: 26
Joined: February 10th, 2008, 5:05 am
Location: Florida , Orlando

Re: Only special name allowed to use cheat

Post by Ryku650 »

Can you explain this? I have no clue what you're talking about. I hardly recognize JASS. :lol:
User avatar
Shamanno1
Forum Staff
Posts: 912
Joined: October 21st, 2007, 6:17 am
Title: 11
Location: WorLd Of WaRcrAfT

Re: Only special name allowed to use cheat

Post by Shamanno1 »

You have to add the lines in green.
~Everything changes~
I have met people who have no dreams, who have simply accepted their fate to work, exist, and die. They are the most miserable people I have ever known.
User avatar
Ryku650
Junior Member
Posts: 26
Joined: February 10th, 2008, 5:05 am
Location: Florida , Orlando

Re: Only special name allowed to use cheat

Post by Ryku650 »

Okay... I do not understand the JASS code. Is there a GUI part to this ? Move this to the GUI section as well please.