SA-MP Forums Archive
TogglePlayerClock. - 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: TogglePlayerClock. (/showthread.php?tid=411718)



TogglePlayerClock. - EmuS - 30.01.2013

hi, well I want the function TogglePlayerClock, dying a user forward 6 hours, for example it is at 10am, thanks.


Re: TogglePlayerClock. - Threshold - 30.01.2013

EDIT: What are you asking for? Time advances itself by 6 hours when a player dies...? You want it so it DOESN'T go ahead 6 hours or...?

Removing the 6 hour skip on player death:
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    new hours, minutes;
    GetPlayerTime(playerid, hours, minutes);
    TogglePlayerClock(playerid, 0);
    SetPlayerTime(playerid, (hours - 6), minutes);
    return 1;
}

public OnPlayerSpawn(playerid)
{
    TogglePlayerClock(playerid, 1);
    return 1;
}
EDIT #2: Didn't quite understand it, but I'm fairly sure this is what you're asking for.


Respuesta: TogglePlayerClock. - EmuS - 30.01.2013

I want you not six hours later, that I can be with SetWorldTime?


Respuesta: TogglePlayerClock. - EmuS - 30.01.2013

EDIT: This code does not work, follow the same time.