[Help]Pawno GM
#1

Well im trying to fix this im trying to make my servers name or anti stop so players can enter with one name other then Firstname_LastName . So if anyone cna take a look at this and tell me what i can change im gonna post the OnplayerConnect.



Quote:

public OnPlayerConnect(playerid)
{

new string[128];
new string2[128];
new plname[MAX_PLAYER_NAME];
new playersip[64];
new zone[MAX_ZONE_NAME];
new bancheck[64];
new msg2[128];
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
GetPlayer2DZone(playerid, zone, MAX_ZONE_NAME);
GetPlayerName(playerid, plname, sizeof(plname));
GetPlayerIp(playerid,playersip,sizeof(playersip));
new namestring = strfind(plname, "_", true);
format(string, sizeof(string),"%s",playersip);
gPlayerUsingLoopingAnim[playerid] = 0;
gPlayerAnimLibsPreloaded[playerid] = 0;

if(AntiName == 1)
{
if(namestring == -1)


So if you can help me that would be great. Thank you, Blessed.
Reply
#2

Add this after GetPlayerName(...)

pawn Код:
if(strfind(plname, "_") == -1)
{
    SendClientMessage(playerid, -1, "Your name must be in the Firstname_Lastname format.");
    Kick(playerid);
    return 1;
}
Reply
#3

I got it i was just supposed to
Код:
if(AntiName == 0)
{
if(namestring == -0)
So i just had to change 1 to 0 So there is no name string or Anti cheat


Thanks though +REP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)