SA-MP Forums Archive
error in bank system - 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: error in bank system (/showthread.php?tid=417867)



error in bank system - Joe Vagos - 22.02.2013

Код:
#include <a_samp>



forward isPlayerInArea(playerid);
forward BankTime(playerid);




  timer1 = SetTimer("isPlayerInArea",100, 1);
  timer2 = SetTimer("BankTime", 999, 1);

public isPlayerInArea()
{
  for(new i = 0; i < MAX_PLAYERS; i++)
  {
        if(IsPlayerInArea(i, 1711.4371, 1731.7839, -1670.3661, -1643.2722))
		{
			SendClientMessage(i, 0xFFFF00AA, "( ! ) Welcome to Bank!");
			KillTimer(timer1);
			return 1;
		}
  }
  return 1;
}

public BankTime()
{
  for(new i = 0; i < MAX_PLAYERS; i++)
  {
	if(IsPlayerInArea(i, 1711.4371, 1731.7839, -1670.3661, -1643.2722))
		{
		new hours;
		new minutes;
		GetPlayerTime(i, hours, minutes);
  	if(hours == 6.00 && minutes == 0.00)
 		  {
			PlayerPlaySound(i, 1058, 0.0, 0.0, 0.0);
			GivePlayerMoney(i, 7500);
			SendClientMessage(i, 0x12900BBF, "||| 6:00 | BANK TIME: |||");
			SendClientMessage(i, 0xFFFF00AA, "YOU RECEIVE +7.500 $");
			KillTimer(timer2);
			return 1;
			}
		}
  }
  return 1;
}
it doesnt work doesnt give money to the player


Re: error in bank system - DrDoom151 - 22.02.2013

Have you tried debugging to find out where it goes wrong?


Re: error in bank system - Joe Vagos - 22.02.2013

yes but i havent got any results ??


Re: error in bank system - DrDoom151 - 22.02.2013

Have you debugged in every step?


Re: error in bank system - Joe Vagos - 22.02.2013

no,, but i think that the error in the timer ?? what u see in that case


Re: error in bank system - DrDoom151 - 22.02.2013

Well I guess you find out once you debug properly.


Re: error in bank system - Joe Vagos - 22.02.2013

ok ,, how to fix the timers


Re: error in bank system - Joe Vagos - 26.02.2013

pump


Re: error in bank system - Joe Vagos - 27.02.2013

no one ?


Re: error in bank system - Joe Vagos - 03.03.2013

Pump