11.03.2010, 22:36
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?
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?