SA-MP Forums Archive
Need a Little Help - 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: Need a Little Help (/showthread.php?tid=85321)



Need a Little Help - Trill - 06.07.2009

Okay, i am scripting something similar to SARPS "Points", my /capture works, at least it looks to, it sends the Client Messages. Script:
Код:
	if(strcmp(cmd, "/capture", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
	    if(PlayerInfo[playerid][pRank] > 4)
	      {
	    		if(PlayerToPoint(30.0,playerid,-1525.5349,2635.0120,55.8359))
						{
						currentpoint = 1;
						curfamily = PlayerInfo[playerid][pFMember];
						pointcappers = FamilyInfo[curfamily][FamilyName];
						SendClientMessageToAll(COLOR_LIGHTRED, "The Point Is Being Captured");
						SendClientMessage(playerid, COLOR_WHITE, "You are attempting to cap the point.");
						SetTimer("CapTimer",1,false);
						return 1;
						}
				}
			}
		}
However, the CapTimer never goes off, it never sends the client message and it doesnt update the Scriptfile.

And yes, i realize it is set to one milisecond, it was set to a minute, bu tthat didnt work either.

If you could help that would be great


Код:
public CapTimer()
{
PointInfo[currentpoint][PointHours] = PointInfo[currentpoint][ResetHours];
PointInfo[currentpoint][OwndFamilyName] = pointcappers;
SendClientMessageToAll(COLOR_LIGHTRED, "The Point Has Been Captured");
SavePoints();
}
EDIT: And no, there is no errors upon compile.


Re: Need a Little Help - Finn - 06.07.2009

No warnings or anything?


Re: Need a Little Help - happyface - 06.07.2009

CapTimer is forwarded?


Re: Need a Little Help - Trill - 07.07.2009

Yea its forwarded, and there is no errors or warnings upon compiling.


Re: Need a Little Help - happyface - 07.07.2009

Quote:
Originally Posted by Trill
Yea its forwarded, and there is no errors or warnings upon compiling.
you could try to return 1; CapTimer yes?




Re: Need a Little Help - Correlli - 07.07.2009

It's best if you add debug messages to see where the problem appears.


Re: Need a Little Help - Trill - 07.07.2009

i was thinking the same thing, i do the same shit with PHP, the MySQL error messages.

How do we do the same thing in PAWN?


Re: Need a Little Help - Correlli - 07.07.2009

Quote:
Originally Posted by Trill
i was thinking the same thing, i do the same shit with PHP, the MySQL error messages.

How do we do the same thing in PAWN?
pawn Код:
printf("DEBUG: debugText.");



Re: Need a Little Help - Trill - 07.07.2009

so i just put that in that Public CapTimer shit?


Re: Need a Little Help - Correlli - 07.07.2009

Quote:
Originally Posted by Trill
so i just put that in that Public CapTimer shit?
Just put it after every line so you'll see where the problem appears.