Auto gates ;)
#7

Ok guys... i have new problem : D

Made gates.. worked for some time.. after 1 day it crashed..

Problem: Gates wont to close !

Code:
public GateChecks()
{
  for(new playerid;playerid<MAX_PLAYERS;playerid++)
  {
    if(IsPlayerInRangeOfPoint(playerid,20, 1544.7, -1628.0, 14.0))PlayerNearlsdpprieksa=1;
    if(IsPlayerInRangeOfPoint(playerid,20, 1588.18, -1637.8, 15.19))PlayerNearlsdpgaraza=1;
    if(IsPlayerInRangeOfPoint(playerid,20, 2237.92, 2450.3, 9.7))PlayerNearlvdpprieksa=1;
    if(IsPlayerInRangeOfPoint(playerid,20, -1571.9, 661.0, 10.0))PlayerNearsfdpprieksa=1;
    if(IsPlayerInRangeOfPoint(playerid,20, -1640.0, 681.0, 10.0))PlayerNearsfdpprieksa2=1;
    if(IsPlayerInRangeOfPoint(playerid,20, 2293.7, 2498.3, 5.6))PlayerNearlvdpgaraza=1;
    if(IsPlayerInRangeOfPoint(playerid,20, -1633.0, 691.0, 6.0 ))PlayerNearsfpdgaraza=1;
  }
  if(PlayerNearlsdpprieksa)MoveObject(lsdpprieksa, 1544.7757568359, -1636.0593261719, 14.057502746582, 3); //vala;
  else MoveObject(lsdpprieksa, 1544.7757568359, -1628.0593261719, 14.057502746582, 3); //ciet

  if(PlayerNearlsdpgaraza)MoveObject(lsdpgaraza, 1598.181640625, -1637.8323974609, 15.19012260437, 3); //vala
  else MoveObject(lsdpgaraza, 1588.181640625, -1637.8323974609, 15.19012260437, 3); //ciet

  if(PlayerNearlvdpprieksa)MoveObject(lvdpprieksa, 2237.9245605469, 2440.337890625, 9.7784118652344, 3); //vala;
  else MoveObject(lvdpprieksa, 2237.9245605469, 2450.337890625, 9.7784118652344, 3); //ciet

  if(PlayerNearsfdpprieksa)MoveObject(sfdpprieksa, -1571.8327636719, 671.40673828125, 10.757417678833, 3); //vala;
  else MoveObject(sfdpprieksa,-1571.8327636719, 661.40673828125, 10.757417678833, 3); //ciet

  if(PlayerNearsfdpprieksa2)MoveObject(sfdpprieksa2, -1640.7103271484, 670.74017333984, 10.143852233887, 3); //vala;
  else MoveObject(sfdpprieksa2, -1640.7103271484, 681.74017333984, 10.143852233887, 3); //ciet

  if(PlayerNearlvdpgaraza)MoveObject(lvdpgaraza, 2293.5239257813, 2498.0485839844, 10.119644165039, 3); //vala;
  else MoveObject(lvdpgaraza, 2293.5239257813, 2498.0485839844, 5.119644165039, 3); //ciet

  if(PlayerNearsfpdgaraza)MoveObject(sfpdgaraza, -1633.3469238281, 691.77557373047, 11.1875, 3); //vala;
  else MoveObject(sfpdgaraza, -1633.3469238281, 691.77557373047, 6.1875, 3); //ciet
}
compiled:No errors :-/
what i have made wrong?

with other stuff - OKI,DOKI

Code:
public OnPlayerSpawn(playerid)
{
	if(isskin())  {
	SetTimer("GateChecks",3000,1);}
	return 1;
}
Code:
forward isskin();
public isskin()
{
  new playerid;
  new skin = GetPlayerSkin(playerid);
	switch(skin)
	{
	  case 274,275,276,280,281,282,283,284,288,285,286,287,163,164,165,166,277,278,279: return 1;
	}
	return 0;
}
Reply


Messages In This Thread
Auto gates ;) - by GaGlets(R) - 23.11.2009, 17:27
Re: Auto gates ;) - by patchkinson - 23.11.2009, 17:31
Re: Auto gates ;) - by dice7 - 23.11.2009, 17:49
Re: Auto gates ;) - by GaGlets(R) - 23.11.2009, 19:57
Re: Auto gates ;) - by Joe Staff - 23.11.2009, 23:33
Re: Auto gates ;) - by GaGlets(R) - 24.11.2009, 11:45
Re: Auto gates ;) - by GaGlets(R) - 25.11.2009, 15:02
Re: Auto gates ;) - by GaGlets(R) - 25.11.2009, 16:01

Forum Jump:


Users browsing this thread: 1 Guest(s)