[UNSOLVED] Remove Roadblock
#3

My Pawno just crashes, this is how my looks like:

Код:
if(strcmp(cmd, "/roadblock", true) == 0)
	{
	  if( Roadblock < 1 )
	  {
			if(gTeam[playerid] == TEAM_LSPD || gTeam[playerid] == TEAM_FBI)
			{
		    if(PlayerInfo[playerid][LAERank] >= 1)
		    {
					new Float:pX, Float:pY, Float:pZ, Float:pA;
	    		GetPlayerPos(playerid, pX, pY, pZ);
	    		GetPlayerFacingAngle(playerid, pA);
	    		Roadblock = CreateObject(981, pX, pY, pZ, 0.0, 0.0, pA);
	    		SendClientMessage(playerid, COLOR_BLUE, "You have successfully deployed a roadblock");
	    		return 1;
				}
				else
				{
				  SendClientMessage(playerid, COLOR_GREY, "	You are not authorized to use that command.");
				  return 1;
				}
			}
			else
			{
			  SendClientMessage(playerid, COLOR_GREY, "	You are not a Law Enforcer.");
			  return 1;
			}
		}
		else
		{
		  SendClientMessage(playerid, COLOR_GREY, "	You have deployed posted a roadblock.");
		  return 1;
		}
		return 1;
	}
	
	if(strcmp(cmd, "/removeroadblock", true) == 0)
	{
			if(gTeam[playerid] == TEAM_LSPD || gTeam[playerid] == TEAM_FBI)
			{
		    if(PlayerInfo[playerid][LAERank] >= 1)
		    {
				  if( Roadblock >= 1 )
				  {
				    DestroyObject( Roadblock );
				    Roadblock = 0; 
				  }
				  else
				  {
				    SendClientMessage(playerid, COLOR_GREY, "	You have not deployed any roadblock.");
				    return 1;
				  }
				}
				else
				{
				  SendClientMessage(playerid, COLOR_GREY, "	You are not authorized to use that command.");
				  return 1;
				}
			}
			else
			{
			  SendClientMessage(playerid, COLOR_GREY, "	You are not a Law Enforcer.");
			  return 1;
			}
	  }
	  return 1;
	}
Reply


Messages In This Thread
[UNSOLVED] Remove Roadblock - by FreddeN - 10.02.2010, 00:56
Re: [HELP] Remove Roadblock - by Calgon - 10.02.2010, 01:11
Re: [HELP] Remove Roadblock - by FreddeN - 10.02.2010, 01:19
Re: [HELP] Remove Roadblock - by FreddeN - 10.02.2010, 01:38
Re: [HELP] Remove Roadblock - by FreddeN - 10.02.2010, 10:17

Forum Jump:


Users browsing this thread: 2 Guest(s)