questions
#7

OK, thanks, now another problem.. >_>


So, I my anti text/command spam script a bit, and its stop working. When I use 1-3 commands, it likes freezes the server when using commands, and anti text spam - I can spam howmuch I want.

I tried to test it with new.pwn, same.

Script, with it I tested it:


pawn Code:
#include "..\pawno\include\a_samp.inc"
#include "..\pawno\include\zcmd.inc"

new CommandSpam[MAX_PLAYERS], TextSpam[MAX_PLAYERS];

main(){}

public OnPlayerText(playerid)
{
    if(TextSpam[playerid] != 0 && gettime() > TextSpam[playerid]) return 0;
    TextSpam[playerid] = gettime() + 2;
    return 1;
}

public OnPlayerCommandReceived(playerid, cmdtext[])
{
    if(CommandSpam[playerid] != 0 && gettime() > CommandSpam[playerid]) return 0;
    CommandSpam[playerid] = gettime() + 2;
    return 1;
}

CMD:pirma(playerid, params[]) return SendClientMessage(playerid, -1, "{33AA33}Komanda NR. 1");

CMD:antra(playerid, params[]) return SendClientMessage(playerid, -1, "{33AA33}Komanda NR. 2");

CMD:info(playerid, params[])
{
    new sz_String[69];
    format( sz_String, 69, "{FFFFFF}Text Spam - {33AA33}%d\n{FFFFFF}Command Spam - {33AA33}%d", TextSpam[playerid], CommandSpam[playerid]);
    ShowPlayerDialog(playerid,  1339, DIALOG_STYLE_MSGBOX, "{FFFFFF}Info", sz_String, "Close", "" );
    return 1;
}
Reply


Messages In This Thread
questions - by Gh0sT_ - 31.07.2011, 20:04
Re: questions - by LetsOWN[PL] - 31.07.2011, 20:06
Re: questions - by Onyx - 31.07.2011, 20:09
Re: questions - by Calgon - 31.07.2011, 20:13
Re: questions - by LetsOWN[PL] - 31.07.2011, 20:16
Re: questions - by Onyx - 31.07.2011, 20:37
Re: questions - by Gh0sT_ - 31.07.2011, 22:39
Re: questions - by Gh0sT_ - 01.08.2011, 00:15
Re: questions - by Gh0sT_ - 01.08.2011, 12:18
Re: questions - by AndreT - 01.08.2011, 12:40

Forum Jump:


Users browsing this thread: 3 Guest(s)