Official Soldat Forums

Server Talk => Scripting Discussions and Help => Topic started by: [Project-Ult]Jake on March 23, 2008, 06:21:15 pm

Title: whats wrong with this (im new lolz XD)
Post by: [Project-Ult]Jake on March 23, 2008, 06:21:15 pm
yeah well basicly im trying to get it to display a message when admins logg in so yeah please tell me whats wrong with it so i can learn from my mistakes...thanks  :D

Code: [Select]
procedure OnAdminConnect(IP: string)
begin
 WriteConsole(Target, GetPlayerStat(Target, 'Name') + 'has enter the game, so turn them hax off now!', $FFFF0000)
end;

im well awear that i suck at it atm so you dont have to state that fact  :P
Title: Re: whats wrong with this (im new lolz XD)
Post by: EnEsCe on March 23, 2008, 07:26:57 pm
For starters, the script doesnt know what your 'Target' variable is. Its undefined
Title: Re: whats wrong with this (im new lolz XD)
Post by: chutem on March 24, 2008, 04:00:42 am
procedure OnAdminConnect(IP: string);
begin
 WriteConsole(0, IPToName(IP) + 'has enter the game, so turn them hax off now!', $FFFF0000);
end;

I put in the zero because I assumed you wanted all players to see this message
The only bit i'm not too sure about is the IPToName(IP) bit, I think there may be extra parameters, but can't be bothered to check :D
I am pretty sure that will work if the IPToName bit is correct