how to create a condition?
#1

is it a code anti-advertising in PM ? But does this code work at the commands of /register and /login . Exemple: /login 12345 -> mute
And it badly, because it is not possible to be registered and login.

public OnPlayerCommandText(playerid, cmdtext[])
{


new string[256];
for(new i;i < strlen(cmdtext);i++)
{
new a[2],c=0;
for(new j = 0;j < strlen(cmdtext);j++)
{
strmid(a,cmdtext,i+j,i+j+1,2);
if('0' <= a[0] <= '9')c+=1;
}
if(c == 5)
{
MutePM[playerid] = 1;
mutepmtime[playerid] = 180;
SendClientMessage(playerid, 0xFFFFFFAA, " Reklama ");
SendClientMessage(playerid, 0xFFFFFFAA, " Chat off");
format(string,sizeof(string)," Warning %s tried to send text in PM: %s",oGetPlayerName(playerid), cmdtext);
ABroadCast(COLOR_YELLOW,string,1);
return 0;
}
}
=========================

how to create a condition that on the commands of /register and /login anti advertising malfunctioned?
Reply
#2

prompt me please
Reply
#3

put this function below the register function.
Reply
#4

why? this function needs me. Simply that malfunctioned on the commands of /register and /login
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)