SA-MP Forums Archive
[Help]Pawno GM - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [Help]Pawno GM (/showthread.php?tid=338494)



[Help]Pawno GM - Blessed - 29.04.2012

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.


Re: [Help]Pawno GM - SuperViper - 30.04.2012

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;
}



Re: [Help]Pawno GM - Blessed - 30.04.2012

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