Examples would be appreciated!
Only special name allowed to use cheat
Moderator: Cheaters
-
Ryku650
- Junior Member
- Posts: 26
- Joined: February 10th, 2008, 5:05 am
- Location: Florida , Orlando
Only special name allowed to use cheat
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? 
Examples would be appreciated!
Examples would be appreciated!
-
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
Already answered 8 times (at least).
http://forum.wc3edit.net/search.php
http://forum.wc3edit.net/search.php
-
Ryku650
- Junior Member
- Posts: 26
- Joined: February 10th, 2008, 5:05 am
- Location: Florida , Orlando
-
Ozzapoo
- The Flying Cow!
- Posts: 2196
- Joined: November 2nd, 2007, 10:34 pm
- Location: Melbourne
- Been thanked: 1 time
Re: Only special name allowed to use cheat
What did you search...
Visit Ozzapoo.net, my blog and the home of AutoCP and Cheatpack Detector!
AutoCP3 now available for free!
AutoCP3 now available for free!
-
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
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
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
If you want to chat/game with me:
Blizzard: Senethior459#1962
Discord: Kyle#7409
Steam: Spacekidkyle
-
Ryku650
- Junior Member
- Posts: 26
- Joined: February 10th, 2008, 5:05 am
- Location: Florida , Orlando
Re: Only special name allowed to use cheat
Thanks.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
Special Player Cheat. Something like that. I can't remember it all.Ozzapoo wrote:What did you search...
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-
initialD
- Some Honorary Title
- Posts: 1713
- Joined: June 8th, 2007, 5:08 am
- Title: Angry Bird
Re: Only special name allowed to use cheat
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
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
-
Ryku650
- Junior Member
- Posts: 26
- Joined: February 10th, 2008, 5:05 am
- Location: Florida , Orlando
Re: Only special name allowed to use cheat
Can you explain this? I have no clue what you're talking about. I hardly recognize JASS. 
-
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
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.
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.
-
Ryku650
- Junior Member
- Posts: 26
- Joined: February 10th, 2008, 5:05 am
- Location: Florida , Orlando
Re: Only special name allowed to use cheat
Okay... I do not understand the JASS code. Is there a GUI part to this ? Move this to the GUI section as well please.