wc3edit.net

United Warcraft 3 map hacking!
It is currently April 26th, 2024, 10:01 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: August 2nd, 2012, 7:16 pm 
This auto ban system I saw in the FAQ section is very useful:

Spoiler:
Code:
local string PlayerName="<REPLACE THIS WITH THE PLAYER NAME>" //Entirely lowercase!
local integer i=0

loop
exitwhen i>11
if GetPlayerName(Player(i))==StringCase(PlayerName,false)then
call CustomDefeatBJ(Player(i),"You are banned.")
endif
set i=i+1
endloop


But i was wondering if anyone could "upgrade" it so instead of entering manually the banned persons there would be a command like:
-ban x JohnDoe or -unban JohnDoe
Those two commands would add or remove the desired name from a list which is checked everytime in the auto ban function on map startup.In C++ i would have an ideea how to do this using a text vector but in JASS i dont have any clue about how to store the multiple names(maybe using a string array but i still don't know how to put it together :().

Thank you very much and I hope someone will answer (even if its a not possible answer).

Best regards,
Chayner


Top
  
 
PostPosted: August 3rd, 2012, 3:05 am 
Offline
Grammar King
User avatar

Joined: June 22nd, 2008, 10:11 pm
Posts: 2410
Location: Mostly USEast
Title: Worst human for 4eva
It would not be possible because it would have to edit the actual jass file itself.

This can result in two things (assuming that it is able to actually edit the file permanently, which it isn't):

One, it'll only affect those in the current game right now and you will have to redownload a map (whereby resetting it to the JASS file which the host is using)

or two, it'll desync every game and everyone will get kicked out (if the downloading doesn't actually happen).

_________________
Quote:
(20:53:52) Bartimaeus: Thank you, Jen.
(20:53:56) Bartimaeus: Truly, you are wise.


Quote:
(23:44:12) Bartimaeus: I was in pubic school until middle school...


Learn how to extract and read RAW Codes here!

Need help? Click here and ask your question!


Top
 Profile  
 
PostPosted: August 3rd, 2012, 6:07 am 
Thanks for the quick reply and I'm glad (even if it doesnt work) that actually i understood this.
Anyways the manual input isnt bad either ;) I will just make a list and update it every version with the banned people.


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 26 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

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO


Privacy Policy Statement
Impressum (German)