Faster Time Filterscript
#1

Hello guys.
Do you know a filterscript that will cause something like the YSOHNUL cheat in singleplayer, faster clock? I really need it for a video I am making.
Thanks in advance.
Reply
#2

Hmm, probably you can script (tell the scripter of your community) to make a timer with a low interval like 2 or 3 seconds (repeating=true) and he uses SetPlayerTime/SetWorldTime.

https://sampwiki.blast.hk/wiki/SetPlayerTime
https://sampwiki.blast.hk/wiki/SetWorldTime

PS:Not sure of the idea but you can give it a try.
Reply
#3

Something like this, hasn't been tested though:

pawn Код:
#include <a_samp>
#include <zcmd>

new timer[MAX_PLAYERS];
new timervalue[MAX_PLAYERS];
new bool: timeractivated[MAX_PLAYERS];

CMD:startclock(playerid, params);
{
    if(!timeractivated[playerid])
    {
        timer[playerid] = SetTimerEx("fastclock", 750, true, "i", playerid);
        timervalue[playerid] = 0;

        timeractivated[playerid] = true;
        SendClientMessage(playerid, -1, "YSOHNUL activated!");
    }

    else if(timeractivated[playerid])
    {
        timervalue[playerid] = 0;
        KillTimer(timer[playerid]);

        timeractivated[playerid] = false;
        SendClientMessage(playerid, -1, "YSOHNUL deactivated!");
    }

    return true;
}

forward fastclock(playerid);
public fastclock(playerid)
{
    if(timervalue[playerid] < 23)
    {
        timervalue[playerid] += 1;
        SetPlayerTime(playerid, timervalue[playerid]);
    }
   
    else if(timervalue[playerid] => 23)
    {
        timervalue[playerid] = 0;
        SetPlayerTime(playerid, timervalue[playerid]);
    }

    return true;
}
Reply
#4

Quote:
Originally Posted by MattTucker
Посмотреть сообщение
Hmm, probably you can script (tell the scripter of your community) to make a timer with a low interval like 2 or 3 seconds (repeating=true) and he uses SetPlayerTime/SetWorldTime.

https://sampwiki.blast.hk/wiki/SetPlayerTime
https://sampwiki.blast.hk/wiki/SetWorldTime

PS:Not sure of the idea but you can give it a try.
Thanks, but there is no community nor scripter. I just need a fella to help me out

Quote:
Originally Posted by Mionee
Посмотреть сообщение
Something like this, hasn't been tested though:

pawn Код:
#include <a_samp>
#include <zcmd>

new timer[MAX_PLAYERS];
new timervalue[MAX_PLAYERS];
new bool: timeractivated[MAX_PLAYERS];

CMD:startclock(playerid, params);
{
    if(!timeractivated[playerid])
    {
        timer[playerid] = SetTimerEx("fastclock", 750, true, "i", playerid);
        timervalue[playerid] = 0;

        timeractivated[playerid] = true;
        SendClientMessage(playerid, -1, "YSOHNUL activated!");
    }

    else if(timeractivated[playerid])
    {
        timervalue[playerid] = 0;
        KillTimer(timer[playerid]);

        timeractivated[playerid] = false;
        SendClientMessage(playerid, -1, "YSOHNUL deactivated!");
    }

    return true;
}

forward fastclock(playerid);
public fastclock(playerid)
{
    if(timervalue[playerid] < 23)
    {
        timervalue[playerid] += 1;
        SetPlayerTime(playerid, timervalue[playerid]);
    }
   
    else if(timervalue[playerid] => 23)
    {
        timervalue[playerid] = 0;
        SetPlayerTime(playerid, timervalue[playerid]);
    }

    return true;
}
Documents\Server\filterscripts\fasttime.pwn(9) : error 055: start of function body without function header
Documents\Server\filterscripts\fasttime.pwn(10) : error 010: invalid function or declaration
Documents\Server\filterscripts\fasttime.pwn(15) : error 010: invalid function or declaration
Documents\Server\filterscripts\fasttime.pwn(19) : error 010: invalid function or declaration
Documents\Server\filterscripts\fasttime.pwn(24) : error 010: invalid function or declaration
Documents\Server\filterscripts\fasttime.pwn(2 : error 010: invalid function or declaration
Documents\Server\filterscripts\fasttime.pwn(37) : warning 202: number of arguments does not match definition
Documents\Server\filterscripts\fasttime.pwn(40) : warning 211: possibly unintended assignment
Documents\Server\filterscripts\fasttime.pwn(40) : error 029: invalid expression, assumed zero
Documents\Server\filterscripts\fasttime.pwn(40) : warning 215: expression has no effect
Documents\Server\filterscripts\fasttime.pwn(40) : error 001: expected token: ";", but found ")"
Documents\Server\filterscripts\fasttime.pwn(40) : error 029: invalid expression, assumed zero
Documents\Server\filterscripts\fasttime.pwn(40) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
10 Errors.
Reply
#5

I apologise! I didn't compile it beforehand.

This will work:
pawn Код:
#include <a_samp>
#include <zcmd>

new timer[MAX_PLAYERS];
new timervalue[MAX_PLAYERS];
new bool: timeractivated[MAX_PLAYERS];

CMD:startclock(playerid, params)
{
    if(!timeractivated[playerid])
    {
        timer[playerid] = SetTimerEx("fastclock", 750, true, "i", playerid);
        timervalue[playerid] = 0;

        timeractivated[playerid] = true;
        SendClientMessage(playerid, -1, "YSOHNUL activated!");
    }

    else if(timeractivated[playerid])
    {
        timervalue[playerid] = 0;
        KillTimer(timer[playerid]);

        timeractivated[playerid] = false;
        SendClientMessage(playerid, -1, "YSOHNUL deactivated!");
    }

    return true;
}

forward fastclock(playerid);
public fastclock(playerid)
{
    if(timervalue[playerid] < 23)
    {
        timervalue[playerid] += 1;
        SetPlayerTime(playerid, timervalue[playerid], 0);
    }

    else if(timervalue[playerid] >= 23)
    {
        timervalue[playerid] = 0;
        SetPlayerTime(playerid, timervalue[playerid], 0);
    }

    return true;
}
Reply
#6

Quote:
Originally Posted by Mionee
Посмотреть сообщение
I apologise! I didn't compile it beforehand.

This will work:
pawn Код:
#include <a_samp>
#include <zcmd>

new timer[MAX_PLAYERS];
new timervalue[MAX_PLAYERS];
new bool: timeractivated[MAX_PLAYERS];

CMD:startclock(playerid, params)
{
    if(!timeractivated[playerid])
    {
        timer[playerid] = SetTimerEx("fastclock", 750, true, "i", playerid);
        timervalue[playerid] = 0;

        timeractivated[playerid] = true;
        SendClientMessage(playerid, -1, "YSOHNUL activated!");
    }

    else if(timeractivated[playerid])
    {
        timervalue[playerid] = 0;
        KillTimer(timer[playerid]);

        timeractivated[playerid] = false;
        SendClientMessage(playerid, -1, "YSOHNUL deactivated!");
    }

    return true;
}

forward fastclock(playerid);
public fastclock(playerid)
{
    if(timervalue[playerid] < 23)
    {
        timervalue[playerid] += 1;
        SetPlayerTime(playerid, timervalue[playerid], 0);
    }

    else if(timervalue[playerid] >= 23)
    {
        timervalue[playerid] = 0;
        SetPlayerTime(playerid, timervalue[playerid], 0);
    }

    return true;
}
Works indeed, thanks a lot mate.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)