SA-MP Forums Archive
stop "/" - 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: stop "/" (/showthread.php?tid=398329)



stop "/" - Glad2BeHere - 09.12.2012

//under on player text
pawn Код:
OnPlayerText(playerid,text[])
{
        if(!strcmp(text, "/", true))
    {
     if(LoggedIn[playerid] == 1)
     {
      SendClientMessage(playerid, -1,"log in first please");
      return 0;
     }
    }
        return 1;
}
Can someone help with so that if someone types "/" and they are not logged in it sends them a message


Re: stop "/" - Dragony92 - 09.12.2012

pawn Код:
public OnPlayerText(playerid,text[])
{
    if(strfind(text, "/", true) != -1)
    {
        if(LoggedIn[playerid] == 1)
        {
            SendClientMessage(playerid, -1,"log in first please");
            return 0;
        }
    }
    return 1;
}
But if you want to disable commands just return them in OnPlayerCommandText...


Re: stop "/" - Glad2BeHere - 09.12.2012

using zcmd and i am using this for players who are not logged in, i have it has logged in atm just to test it out ty dude gonna test this code