Author Topic: Some questions  (Read 697 times)

0 Members and 1 Guest are viewing this topic.

Offline RunMan

  • Major(1)
  • Posts: 27
Some questions
« on: April 12, 2008, 03:19:53 pm »
Hello!

I have got some questions to you and I hope that you will help me (again) :)

1. Is there function in Pascal like toLowerCase in JS? (Change all letters from string to small letters)
2. How to check is player an admin? I think, that I've read that admin have got ID 255. What will happen, if there are 2 admins or more at the same time on the server?

I tried to do something like this:
Code: [Select]
var Admin: integer;

begin;
Admin := 0;
end;

procedure OnAdminConnect(IP: String);
begin
Admin := 1;
end;

procedure OnAdminDisconnect(IP: String);
begin
Admin := 0;
end;
But it's good only when there will be only one admin on the server.

3. Is it possible to say 'in color' in normal in-game-chat?

Offline JFK

  • Camper
  • ***
  • Posts: 255
    • My TraxInSpace Account
Re: Some questions
« Reply #1 on: April 12, 2008, 03:42:56 pm »
1. lowercase(string)

2. ID 255 is the server itself or any TCP-connected admin (like through ARSSE). Also OnAdminConnect, only works for TCP-connected admins. As far as i know, the only way to check if someone is admin IN GAME is to keep track of it. So make an array with slotnumbers. Everytime a player with an IP that is registered in remote.txt enters the game, add his slot to the array. Also add a slot when someone uses /adminlog succesfully. And remove it when they leave of course

3. Sure you can say 'in color', you can say anything you want :p
jk.. again, as far as i know, its not possible.
Come join: EliteCTF
Listen to: My Music

Offline RunMan

  • Major(1)
  • Posts: 27
Re: Some questions
« Reply #2 on: April 12, 2008, 03:48:28 pm »
Thanks for quick response :)