Sziasztok valamiért nem reagál rá mikor elteleportálok, de a timer megy és a szöveget is ki teszi, segítségeitek várom. Köszi.
#include <a_samp>
#define RED 0xAA3333AA
#define PURPLE 0xBF60FFFF
#define BLUE 0x1AAD3FF
#define GREEN 0x94D317FF
#define LIGHTBLUE 0x33CCFFAA
#define LIGHTBLUE2 0xF6BB0AA
#define Time 60000
#define function%0(%1) forward%0(%1); public%0(%1)
#define Loop(%0,%1) for(new %0 = 0; %0 != %1; %0++)
new Teleports[][] =
{
\"/easykp\", \"/funnypk\", \"/upperpk\", \"/extremepk\", \"/hardpk\", \"/bigpk\", \"/oceanicpk\", \"/monsterpk\", \"/lospk\", \"/sivatag\", \"/s000\",
\"/md\", \"/lsair\", \"/ostunt\", \"/lvair\", \"/sfstunt\", \"/cstunt\", \"/sfair\", \"/chilliad\",\"/superstunt\", \"/tube2\", \"/tube3\", \"/si\", \"/golf\", \"/basejump\", \"/bcar\", \"sfj\",
\"/jump1\", \"/jump2\", \"/jump3\", \"/jump4\", \"/wjump\", \"/mpk1\", \"/mpk2\", \"/icerink\",\"/drag1\", \"/drag2\", \"drag3\", \"/canyon\", \"/drift\", \"/drift1\", \"/drift2\", \"/drift3\",
\"/sdrift\", \"/drift4\", \"/island\", \"/party1\", \"/party2\", \"/party3\", \"/party4\", \"/party5\",\"/ls\", \"/lv\", \"/sf\", \"/grov\", \"/beach\", \"/spool\", \"/nrgrainbow\", \"/btbs\",
\"/fplace\", \"/ljump\", \"/rjump\", \"/dunejump\", \"/tjump\", \"/nrgjump\", \"/placejump\", \"/pimps\",\"/jizzy\", \"/jizzyrace\"
},
CmdChars[67] = \"\", CommandReactionTimer, Cash, bool: CommandTestBusy;
public OnFilterScriptInit()
{
print(\"\\nx--------------------------x\");
print(\"| Cmd Reaction TesT LoaDeD |\");
print(\"x--------------------------x\\n\");
CommandReactionTimer = SetTimer(\"CommandReactionTest\", Time, 1);
return 1;
}
public OnFilterScriptExit()
{
print(\"\\nx----------------------------x\");
print(\"| Cmd Reaction TesT UnLoaDeD |\");
print(\"x----------------------------x\\n\");
KillTimer(CommandReactionTimer);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
switch(CommandTestBusy)
{
case true:
{
if(!strcmp(CmdChars, cmdtext, false))
{
new string[128], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), \"{ffffff} {DCAB00}[Teleport Reakció]{FFFFFF}: %s megnyerte a teleport reakciót. \'{01DBCA}%s{FFFFFF}\', és nyert %d $-t!\", pName, CmdChars, Cash);
SendClientMessageToAll(0xFFFFFFAA, string);
GivePlayerMoney(playerid, Cash);
CommandReactionTimer = SetTimer(\"CommandReactionTest\", Time, 1);
CommandTestBusy = false;
return 0;
}
}
}
return 0;
}
function CommandReactionProgress()
{
switch(CommandTestBusy)
{
case true:
{
CommandReactionTimer = SetTimer(\"CommandReactionTest\", Time, 1);
}
}
return 1;
}
function CommandReactionTest()
{
new xLength = (random( + 2), string[128];
Cash = (random(10000) + 20000);
format(CmdChars, sizeof(CmdChars), \"\");
Loop(x, xLength) format(CmdChars, sizeof(CmdChars), \"%s\", Teleports[random(sizeof(Teleports))][0]);
format(string, sizeof(string), \"{ffffff} {C0C0C0}[Teleport Reakció]{FFFFFF}: Aki a leghamarabb elteleportál ide: \'{01DBCA}%s {FFFFFF}\' az nyerhet: %d $-t.\", CmdChars, Cash);
SendClientMessageToAll(0xFFFFFFAA, string);
KillTimer(CommandReactionTimer);
CommandTestBusy = true;
SetTimer(\"CommandReactionProgress\", Time, 0);
return 1;
}