Official Soldat Forums

Server Talk => Scripting Discussions and Help => Topic started by: Centurion on November 05, 2008, 12:13:23 pm

Title: How to do /secret
Post by: Centurion on November 05, 2008, 12:13:23 pm
If I say /secret as a command and it will admin the guy who says it?
please help :)
Title: Re: How to do /secret
Post by: Norbo on November 05, 2008, 12:27:59 pm
Code: [Select]
function OnPlayerCommand(ID: Byte; Text: string): boolean;
begin
if Text = '/secret' then begin
Command('/admip '+GetPlayerStat(ID,'IP');
WriteConsole(ID,'You are now admin.',$FF00FF00);
end
end;
Title: Re: How to do /secret
Post by: BombSki on November 05, 2008, 01:09:59 pm
/adm ID works too
Title: Re: How to do /secret
Post by: Norbo on November 05, 2008, 01:17:50 pm
/adm ID works too
yes, but ip > name
the guy could leave and some other guy might change his name into the guy with admin and ya know
obvoisly thats not likely gonna happen but just to be sure..
Title: Re: How to do /secret
Post by: BombSki on November 05, 2008, 01:35:06 pm
i think its very unlikely that the /adm command is name-based. afaik it just admins the given ID until he/she leaves. /adm is a better command if you have ynamic ip, because else youll get a huge remote.txt
Title: Re: How to do /secret
Post by: danmer on November 07, 2008, 04:16:46 pm
i think /adm still gets the player's ip and saves it in remote.txt , so they have the same effect
Title: Re: How to do /secret
Post by: BombSki on November 08, 2008, 09:03:38 am
hmm seems so, my bad. somehow i thought it worked in the same way as /adminlog (dont tell me that also adds your ip :O)
Title: Re: How to do /secret
Post by: danmer on November 09, 2008, 02:31:16 pm
hmm seems so, my bad. somehow i thought it worked in the same way as /adminlog (dont tell me that also adds your ip :O)
doesnt /adminlog work just as long as you're in the server?..
Title: Re: How to do /secret
Post by: Gizd on November 09, 2008, 02:45:01 pm
/adm - adds player ip to remote.txt
/admip - same but player doesn't needs to be in-game
/adminlog - admin until leave
Title: Re: How to do /secret
Post by: BombSki on November 09, 2008, 02:47:49 pm
@dnmr, yea, thats what i tried to say :P

@gizd: yea