Author Topic: whats wrong with this (im new lolz XD)  (Read 719 times)

0 Members and 1 Guest are viewing this topic.

Offline [Project-Ult]Jake

  • Major(1)
  • Posts: 3
  • attempting to be a coder (just started learning)
whats wrong with this (im new lolz XD)
« 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

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: whats wrong with this (im new lolz XD)
« Reply #1 on: March 23, 2008, 07:26:57 pm »
For starters, the script doesnt know what your 'Target' variable is. Its undefined

Offline chutem

  • Veteran
  • *****
  • Posts: 1119
Re: whats wrong with this (im new lolz XD)
« Reply #2 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
1NK3FbdNtH6jNH4dc1fzuvd4ruVdMQABvs