SA-MP Forums Archive
help, timer... - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: help, timer... (/showthread.php?tid=74374)



help, timer... - user226 - 22.04.2009

I wish that after the command /open camera appear in the job-site and then return the camera to the player
I have done so:
pawn Код:
forward Entry(playerid);

    if(strcmp("/open", cmdtext, true, 5) == 0)
    {
        {
        SetPlayerCameraPos(playerid, 1594.8840,1073.5481,10.3608);
        SetPlayerCameraLookAt(playerid, 1594.8840,1073.5481,10.3608);
        SetTimerEx("entry", 1300, 1, "i");
        }
        return 1;
    }

    public Entry(playerid)
    {
        SetCameraBehindPlayer(playerid);
    }
But there is a problem when I enter /open Camera is in the right place, but once the timer ends with the camera remains the same there..


Re: help, timer... - afei - 22.04.2009

In SetTimerEx you have to define what you mean with "i"..
Also i suggest not to repeat the timer.

Код:
SetTimerEx("entry", 1300, false, "i", playerid);



Re: help, timer... - user226 - 22.04.2009

Quote:
Originally Posted by afei™
In SetTimerEx you have to define what you mean with "i"..
Also i suggest not to repeat the timer.

Код:
SetTimerEx("entry", 1300, false, "i", playerid);
Nothing has changed ;(
Who knows, please tell me how to


Re: help, timer... - user226 - 22.04.2009

problem is solved. Senks.