guys iam almost 2 monthes trying to solve this problem
#1

i have a bank time system it compiles well but it doesnt work in the game hope that you help me


Код:
:
#include <a_samp>
#if defined FILTERSCRIPT

new timer1,timer2;
public OnFilterScriptInit()
{
     timer1 = SetTimer("isPlayerInArea",100, 1);
  timer2 = SetTimer("BankTime", 999, 1);
}
	return 1;
}



public OnFilterScriptExit()
{
	return 1;
}

#else

main()
{
	print("\n----------------------------------");
	print(" Blank Gamemode by your name here");
	print("----------------------------------\n");
}

#endif

stock IsPlayerInArea(playerid, Float:MinX, Float:MinY, Float:MaxX, Float:MaxY)
{
 	new Float:X,
	    Float:Y,
	    Float:Z;
    GetPlayerPos(playerid,X,Y,Z);
    if(X >= MinX && X <= MaxX && Y >= MinY && Y <= MaxY)
	{
  	 	return 1;
    }
    return 0;
}

forward isPlayerInArea();
public isPlayerInArea()
{
  for(new i = 0; i < MAX_PLAYERS; i++)
  {
        if(IsPlayerInArea(i,2085.6704,2059.4272,11.0579,92.7368))
		{
			SendClientMessage(i, 0xFFFF00AA, "( ! ) Welcome to Bank!");
			return 1;
		}
  }
  return 1;
}
forward BankTime();
public BankTime()
{
  for(new i = 0; i < MAX_PLAYERS; i++)
  {
	if(IsPlayerInArea(i,2085.6704,2059.4272,11.0579,92.7368))
		{
		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 $");
			return 1;
			}
		}
  }
  return 1;
}
public OnPlayerConnect(playerid)
{
    SetPlayerMapIcon( playerid,52,2085.6704,2059.4272,11.0579, 12,1,MAPICON_GLOBAL );
	return 1;
}
Reply
#2

Your coordinates are wrong. You probably just saved one position and copied x, y, z and facing angle, right? Do you understand what those params are? Float:MinX, Float:MinY, Float:MaxX, Float:MaxY
Reply
#3

public OnFilterScriptInit()
{
timer1 = SetTimer("isPlayerInArea",100, 1);
timer2 = SetTimer("BankTime", 999, 1);
}
return 1;
}

You are opening a block, then closing it twice.
Reply
#4

Quote:

public OnFilterScriptInit()
{
timer1 = SetTimer("isPlayerInArea",100, 1);
timer2 = SetTimer("BankTime", 999, 1);
}
return 1;
}

You are opening a block, then closing it twice.

i remove th } uder timer 2 and it doesnt work


and about the coordinates i dnt know about them hope u help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)