03.08.2016, 16:52
Ok let me explain whats wrong in simple words:
In most scripts the color defines which start from the word "COLOR" are the pawn colors like this one "0xFFFFFFFF",and the ones which start from "COL_" are hex codes if im not wrong,they are like "{FFFFFF}"
The functions like "SendClientMessage" use the "COLOR" defines,and in dialogs you have to use that "COL_" one otherwise you will get errors.
And the other error for the function GetName(playerid):
And you loop wont check the admin level because there you are using "adlvl[playerid] < 5",it should be "adlvl[i] < 5"
Also you should optimize the loop a bit otherwise you will face server lag or even crashes:
In most scripts the color defines which start from the word "COLOR" are the pawn colors like this one "0xFFFFFFFF",and the ones which start from "COL_" are hex codes if im not wrong,they are like "{FFFFFF}"
The functions like "SendClientMessage" use the "COLOR" defines,and in dialogs you have to use that "COL_" one otherwise you will get errors.
And the other error for the function GetName(playerid):
Код:
stock GetName(playerid) { new Name[50]; GetPlayerName(playerid, Name, sizeof(Name)); return Name; }
Also you should optimize the loop a bit otherwise you will face server lag or even crashes:
Код:
for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(adlvl[i] < 5) { Kick(i); } } }