Nikita_Basik
Ученик
PHP:
C:\Users\КОМП\Desktop\Новая папка (2)\gamemodes\МОД(56081) : warning: recursion in UseRandom
Disable recursion warning: #pragma disablerecursion or #pragma warning disable 238
PHP:
}
new gunwechose = -1;
void UseRandom(playerid, step, secondstep)
{
if(secondstep == 1)
{
if(gunwechose == -1)
{
gunwechose = random(MAX_GUNS_RAND);
}
if(step < MAX_GUNS_RAND)
{
if(randomobject != -1)
{
DestroyDynamicObject(randomobject);
}
randomobject = CreateDynamicObject(RandGunInfo[step][RandGunID],RandGunInfo[step][RandGunPos][0],RandGunInfo[step][RandGunPos][1],RandGunInfo[step][RandGunPos][2],
RandGunInfo[step][RandGunPos][3],RandGunInfo[step][RandGunPos][4],RandGunInfo[step][RandGunPos][5],1229,6);
foreach(i)
{
Streamer_ShowObject(i,randomobject);
//Streamer_Update(i);
}
if(step == gunwechose)
{
gunwechose = -1;
RandomGunGet[playerid] = GetObjectGunID(RandGunInfo[step][RandGunID]);
DestroyTimer = SetTimerEx("RemoveBox", 15000, 0, "d", playerid);
SendClientMessage(playerid, -1, "У вас есть 15 секунд, чтобы забрать оружие из ящика нажав на ALT");
return true;
}
step = step + 1;
SetTimerEx("UseRandom", 750 - (step*50), 0, "ddd", playerid,step,secondstep);
}
return true;
/* step = step - 1;
RandomGunGet[playerid] = GetObjectGunID(RandGunInfo[step][RandGunID]);
SendClientMessage(playerid, -1, "У вас есть 15 секунд, чтобы забрать оружие из ящика нажав на ALT");
DestroyTimer = SetTimerEx("RemoveBox", 15000, 0, "d", playerid);*/
}
else
{
if(step < MAX_GUNS_RAND)
{
if(randomobject != -1)
{
DestroyDynamicObject(randomobject);
}
randomobject = CreateDynamicObject(RandGunInfo[step][RandGunID],RandGunInfo[step][RandGunPos][0],RandGunInfo[step][RandGunPos][1],RandGunInfo[step][RandGunPos][2],
RandGunInfo[step][RandGunPos][3],RandGunInfo[step][RandGunPos][4],RandGunInfo[step][RandGunPos][5],1229,6);
foreach(i)
{
Streamer_ShowObject(i,randomobject);
//Streamer_Update(i);
}
step = step + 1;
SetTimerEx("UseRandom", 750, 0, "ddd", playerid,step,secondstep);
return true;
}
secondstep = 1;
step = 0;
UseRandom(playerid,step,secondstep);
}
return true;
