whats wrong with this timer thing? - 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: whats wrong with this timer thing? (
/showthread.php?tid=150068)
whats wrong with this timer thing? -
hardstop - 24.05.2010
Код:
public Kalastamine()
{
new playerid;
SendClientMessage(playerid, ROHELINE, "* pььdsid kala kinni");
PlayerInfo[playerid][pKalu]++;
PlayerPlaySound(playerid, 1057, 0, 0, 0);
print("Taimer: Kalastamine");
}
no errors, no warnings
but ingame i have set timer to 1minut but it does nothin in-game it should add +1 item and play sound but it only prints Taimer: Kalastamine in console whats the problem?
SetTimer("Kalastamine",60000,true); //1 Minut
forward Kalastamine();
Код:
if(IsPlayerInRangeOfPoint(playerid, 10.0, 1438.7590,512.7771,18.7258))//Kalastamise koht
{
LoopingAnim(playerid,"PED","SEAT_down",4.1,0,1,1,1,0);
SendClientMessage(playerid, LILLA, "* alustasid kalapььgiga");
SetTimer("Kalastamine",60000,true); //1 Minut
new string2[256], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(string2, sizeof(string2), "%s pakib oma kalastus vahendid lahti ning alustab pььgiga", pname);
SendLocalMessage(playerid, LILLA, 7, string2);
}
Re: whats wrong with this timer thing? -
DJDhan - 24.05.2010
Where is the Timer code?
Re: whats wrong with this timer thing? -
hardstop - 24.05.2010
i edited look now.. iv put everything there but yeh
Re: whats wrong with this timer thing? -
Fj0rtizFredde - 24.05.2010
Try with SetTimerEx
![Smiley](images/smilies/smile.png)
Maybe a loop in the public Kalastamine() :P
Re: whats wrong with this timer thing? -
DJDhan - 24.05.2010
Maybe some problem with the Anim or your pKalu variable?
EDIT: you don't get the message ROHELINE... ingame?
Re: whats wrong with this timer thing? -
¤Adas¤ - 24.05.2010
do
forward Something(playerid);
and then
SetTimerEx("Something", interval, repeating, "i", playerid);
and so
Re: whats wrong with this timer thing? -
hardstop - 24.05.2010
il try
Re: whats wrong with this timer thing? -
hardstop - 24.05.2010
With SetTimerEx it works Thnx for all the help
Re: whats wrong with this timer thing? -
¤Adas¤ - 24.05.2010
np