Some thing crashing my gamemode
#1

Hey,well i wanted to make if your near GasBarrels you can search gas,well,but it crashes the game,and server goes off..heres the GasBarrels
Код:
public GasBarrels(playerid)
{
  if(IsPlayerConnected(playerid))
	{
    if(PlayerToPoint(5.0,playerid,2491.2207, -1666.8200, 12.8230) || PlayerToPoint(5.0,playerid,2413.2309, -1372.7017, 24.0660))
		{
		  return 1;
		}
		else if(PlayerToPoint(5.0,playerid,2393.1960, -1451.4156, 23.4748) || PlayerToPoint(5.0,playerid,2043.6928, -1509.8106, 2.9595))
		{
		  return 1;
		}
				else if(PlayerToPoint(5.0,playerid,1928.6831, -1543.4710, 13.1165) || PlayerToPoint(5.0,playerid,1326.8248, -1435.9821, 14.4392))
		{
		  return 1;
		}
						else if(PlayerToPoint(5.0,playerid,1251.6204, -1430.5838, 13.0122) || PlayerToPoint(5.0,playerid,913.5208, -1246.5333, 15.1451))
		{
		  return 1;
		}
		else if(PlayerToPoint(5.0,playerid,913.5208, -1246.5333, 15.1451))
		{
		  return 1;
		}
	}
	return 0;
}
Heres the command

Код:
	if(strcmp(cmd, "/searchgas", true) == 0)
	 {
	  new sendername[MAX_PLAYER_NAME];
		GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
		GetPlayerName(playerid, sendername, sizeof(sendername));
	 	new RandomGas = random(50);
		if(IsPlayerConnected(playerid))
	  	{
	  		if(!GasBarrels(playerid))
	  			{
	    	 	SendClientMessage(playerid,WHITE,"*You are not near Gas Barrels!");
	    	return 1;
	  	}
  			SetTimerEx("Search",3500,0,"i",playerid);
  			Gasonplayer += RandomGas ;
  			SendClientMessage(playerid,0x00FF00FF,"You Found %s % of Fuel",RandomGas);
			format(string, sizeof(string), "* %s Found %s of Fuel.", sendername ,RandomGas);
			ProxDetector(30.0, playerid, string, 0xC2A2DAAA);
 	 		return 1;
		}
	}
i think the problem is in public gasbarrels,because i have same thing with other command when i use something like this
Reply


Messages In This Thread
Some thing crashing my gamemode - by WardenCS - 07.12.2009, 19:20
Re: Some thing crashing my gamemode - by Correlli - 07.12.2009, 19:49
Re: Some thing crashing my gamemode - by WardenCS - 07.12.2009, 21:22
Re: Some thing crashing my gamemode - by Goobiiify - 07.12.2009, 21:30
Re: Some thing crashing my gamemode - by WardenCS - 08.12.2009, 05:05
Re: Some thing crashing my gamemode - by Abernethy - 08.12.2009, 05:08
Re: Some thing crashing my gamemode - by WardenCS - 08.12.2009, 05:16
Re: Some thing crashing my gamemode - by DJDhan - 08.12.2009, 07:18
Re: Some thing crashing my gamemode - by WardenCS - 08.12.2009, 07:34
Re: Some thing crashing my gamemode - by WardenCS - 09.12.2009, 12:50

Forum Jump:


Users browsing this thread: 2 Guest(s)