new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
if(strcmp(pName, "name", true) == 0)//If Name = name
{
}
else if(strcmp(pName, "name", true) != 0)//If Isn't name
{
}
new Name[ MAX_PLAYER_NAME ];
GetPlayerName( playerid, Name, MAX_PLAYER_NAME );
if( !strcmp( Name,"Raimis_R", true ) == 0 )
{
// Logged
}
else
{
//Kick Ban Etc.
}
pawn Код:
|
stock IsPlayerName(playerid,playername[])
{
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid,pname,MAX_PLAYER_NAME);
if(!strcmp(pname,playername)) return 1;
else return 0;
}
if(IsPlayerName(playerid,"INSERTNAME"))
{
}
public OnRconLoginAttempt(ip[], password[], success)
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));//105
if(strcmp(pName, "jNkk1e", true) == 0)
{
SendClientMessage(playerid,0xFF0080FF,"{FFFF00FF}[SERVER]{FF0080FF}Tu esti creatorul serverului, deci deja Admin.");//108
SendClientMessage(playerid,0xFF0080FF,"{FFFF00FF}[SERVER]{FF0080FF}Prin urmare, nu mai ai nevoie de Admin RCON :D");//109
}
else if(strcmp(pName, "jNkk1e", true) != 0)
{
SendClientMessage(playerid,0xFF0080FF,"{FFFF00FF}[SERVER]{FF0080FF}Ce faci aici? Chiar vrei sa te loghezi la RCON?");//113
SendClientMessage(playerid,0xFF0080FF,"{FFFF00FF}[SERVER]{FF0080FF}Nu conteaza ca te-ai logat corect, ai primit Kick!");//114
Kick(playerid);//115
}
return 1;
}
C:\Documents and Settings\alin\Desktop\SimonSpune Romвnia\gamemodes\simsp.pwn(105) : error 017: undefined symbol "playerid"
C:\Documents and Settings\alin\Desktop\SimonSpune Romвnia\gamemodes\simsp.pwn(108) : error 017: undefined symbol "playerid"
C:\Documents and Settings\alin\Desktop\SimonSpune Romвnia\gamemodes\simsp.pwn(109) : error 017: undefined symbol "playerid"
C:\Documents and Settings\alin\Desktop\SimonSpune Romвnia\gamemodes\simsp.pwn(113) : error 017: undefined symbol "playerid"
C:\Documents and Settings\alin\Desktop\SimonSpune Romвnia\gamemodes\simsp.pwn(114) : error 017: undefined symbol "playerid"
C:\Documents and Settings\alin\Desktop\SimonSpune Romвnia\gamemodes\simsp.pwn(115) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
6 Errors.
public OnRconLoginAttempt(ip[], password[], success);
{
new pName[MAX_PLAYER_NAME];
for (new i = GetMaxPlayers(), j; j < i; i++)
{
GetPlayerName(i, pName, sizeof (pName));
if (!strcmp(pName, "name", true) && success)
{
// success
}
else
{
// got the password right, but he's not using the right name
}
}
return 1;
}