stop "/"
#1

//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
Reply
#2

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...
Reply
#3

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)