PDA

View Full Version : Little Help!


Sanady
08/12/2013, 11:12 AM
Hello everybody.Does anyone know how to divide time on timer by 2 ?

SkittlesAreFalling
08/12/2013, 11:16 AM
SetTimer("SomeFunction", ((10000) / 2), true/false);

We need the code for the timer to help you.

Sanady
08/12/2013, 11:43 AM
SetTimer("SomeFunction", ((10000) / 2), true/false);

We need the code for the timer to help you.

Hmm I tried it but when I enter to the point for capture capturing is very short.So can anyone give me some solutions..?

SkittlesAreFalling
08/12/2013, 11:44 AM
Give us the timer code.

Sanady
08/12/2013, 11:48 AM
/*if(pMod[playerid][ShorterTimeForCapture] == 1)
{
format(slova,56,"(%d)/2",GangZones[i][CaptureTime]);
GangZones[i][CapturingTimer] = SetTimerEx("OnPlayerCaptureGangZone", slova[56], 0, "dd", playerid, i);
}
else if(pMod[playerid][ShorterTimeForCapture] == 0)
{
GangZones[i][CapturingTimer] = SetTimerEx("OnPlayerCaptureGangZone", GangZones[i][CaptureTime], 0, "dd", playerid, i);
}*/


Here it is!

SkittlesAreFalling
08/12/2013, 11:53 AM
format(slova,56,"(%d)/2",GangZones[i][CaptureTime]);
GangZones[i][CapturingTimer] = SetTimerEx("OnPlayerCaptureGangZone", slova[56], 0, "dd", playerid, i);

to:

GangZones[i][CapturingTimer] = SetTimerEx("OnPlayerCaptureGangZone", (GangZones[i][CaptureTime]/2), 0, "dd", playerid, i);
format is for strings, it doesn't perform math.

Sorry for delayed response.
This forum requires that you wait 240 seconds between posts. Please try again in 64 seconds.