Witam znowu zwracam się do Was z prośbą, chodzi tutaj o powiadomienie o dołączeniu na serwer. Jestem początkującym i dopiero się uczę, od tego jest forum, to piszę :).
Problemy są z liniami kodu nr. 21, 25, 28, 32, 35, 38, 41, 42. Wstawiam w pliku, ponieważ nie widzę sensownego i estetycznego sposobu, którym mógłbym wkleić go tutaj.
Dziękuję z góry za odpowiedź.
Playerconnect.sp
#include <sourcemod>
#include <sdktools>
public Plugin:myinfo = {
name = "Connect Player",
author = "Bayont",
description = "My first plugin",
url = ""
};
public void OnClientConnected(client)
{
new String:name[32];
new String:auth[32];
if (IsPlayerGenericAdmin(client) == false && IsPlayerReservationAdmin(client) == true)
{
GetClientName(client, name, sizeof(name));
GetClientAuthId(client, AuthId_Engine, auth);
PrintToChatAll("\x01 [\x07Informacja\x01]\x02VIP\x01 \x04%s\x01 (\x05%s\x01) \x03dołączył do więzienia\x01", name, auth);
}
if (IsPlayerRootAdmin(client) == true)
{
GetClientName(client, name, sizeof(name));
GetClientAuthId(client, AuthId_Engine, auth);
PrintToChatAll("\x01 [\x07Informacja\x01]\x02Opiekun\x01 \x04%s\x01 (\x05%s\x01) \x03dołączył do więzienia\x01", name, auth);
}
if (IsPlayerGenericAdmin(client) == true)
{
GetClientName(client, name, sizeof(name));
GetClientAuthId(client, AuthId_Engine, auth);
PrintToChatAll("\x01 [\x07Informacja\x01]\x02Admin\x01 \x04%s\x01 (\x05%s\x01) \x03dołączył do więzienia\x01", name, auth);
}
else
{
GetClientName(client, name, sizeof(name));
GetClientAuthId(client, AuthId_Engine, auth);
PrintToChatAll("\x01 [\x07Informacja\x01] Gracz \x04%s\x01 (\x05%s\x01) \x03dołączył do więzienia\x01", name, auth;
}
}
bool:IsPlayerGenericAdmin(client)
{
if (CheckCommandAccess(client, "generic_admin", ADMFLAG_GENERIC, false))
{
return true;
}
return false;
}
bool:IsPlayerRootAdmin(client)
{
if (CheckCommandAccess(client, "root_admin", ADMFLAG_ROOT, false))
{
return true;
}
return false;
}
bool:IsPlayerReservationAdmin(client)
{
if (CheckCommandAccess(client, "reservation_admin", ADMFLAG_RESERVATION, false))
{
return true;
}
return false;
}