SA-MP Forums Archive
NON-RP Name kick. Small problem - 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: NON-RP Name kick. Small problem (/showthread.php?tid=617100)



NON-RP Name kick. Small problem - Josh_Main - 15.09.2016

Fixed


Re: NON-RP Name kick. Small problem - Jstylezzz - 15.09.2016

Код:
if(PlayerInfo[playerid][pAdmin] == 0) && strfind(name,"_",true)== -1)
This won't compile anyway since you have a bracket too much. The bracket after == 0 should be removed for this if statement to be correct.
After the fix it would be
Код:
if(PlayerInfo[playerid][pAdmin] == 0 && strfind(name,"_",true)== -1)



Re: NON-RP Name kick. Small problem - Josh_Main - 16.09.2016

Thanks heaps man! If the player does have a roleplay name, will the the code underneath still be executed?

This code?
PHP код:
if(IsPlayerNPC(playerid)) 
    { 
        
printf("NPC: OnPlayerRequestClass: %d"playerid); 
        return 
1
    } 
    if(
gPlayerLogged[playerid] == 0
    { 
        switch(
gPlayerAccount[playerid]) 
        { 
            case 
0DisplayDialogForPlayer(playerid2); //register 
            
case 1DisplayDialogForPlayer(playerid1); //login 
//etc etc etc etc