SA-MP Forums Archive
[HELP] /ar bugs the whole server| Helpers in /newb bug the whole server - 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: [HELP] /ar bugs the whole server| Helpers in /newb bug the whole server (/showthread.php?tid=282230)



[HELP] /ar bugs the whole server| Helpers in /newb bug the whole server - JiMadness - 10.09.2011

When admin does /ar (accepting report) the whole server restarts or stops sometimes
Also when Helpers use /newb the whole server restarts or stops


Please help ASAP


Re: [HELP] /ar bugs the whole server| Helpers in /newb bug the whole server - emokidx - 10.09.2011

post the codes


Re: [HELP] /ar bugs the whole server| Helpers in /newb bug the whole server - Davz*|*Criss - 10.09.2011

I will give you an example of Newbie chat.

On top under your includes:

pawn Код:
new NeedToWait[MAX_PLAYERS];
And anywhere in your script, MAKESURE do not post it under any callback, Also you might need Zcmd include though if you don't have it.

pawn Код:
COMMAND:newb(playerid, params[])
{
    new string[128];
    new Message[128];
    new NewbSender[MAX_PLAYER_NAME];

    if(sscanf(params, "s", Message))
    {
        SendClientMessage(playerid, 0xF88017FF, "Correct Usage: /Newb (Message).");
        SendClientMessage(playerid, 0xF88017FF, "Function: Will send your question in Newbie chat.");
        return 1;
    }
    if(GetTickCount() - NeedToWait[playerid] <  30000) return SendClientMessage(playerid, 0xF88017FF,"You can only ask an question once every 30 seconds.");
    NeedToWait[playerid] = GetTickCount();
    {
        GetPlayerName(playerid, NewbSender, sizeof(NewbSender));
        format(string,sizeof(string),"Newbie %s: %s",NewbSender,Message);
        SendClientMessageToAll(0xF88017FF,string);
        return 1;
    }
}
Thanks.