Buggy command
#1

Hello people I'm wanting urgent help someone, and I have to fix this, is this is this following command buggy auto park the vehicle:

Код:
    if(strcmp(cmd, "/autoestacionar", true) == 0)
	{
	    if(PlayerInfo[playerid][pCarro] == 255)
	    {
	       SendClientMessage(playerid, COLOR_GREY,"You do not own a vehicle.");
	       return 1;
	    }
		if(!IsPlayerInAnyVehicle(playerid))
		{
			SendClientMessage(playerid,COLOR_GREY,"You need to be on your vehicle.");
			return 1;
		}
	   	new Float:x,Float:y,Float:z;
		new Float:a;
		new carid;
		new getcarid;
		if(IsPlayerInVehicle(playerid,carid) && CarInfo[carid][cOwned] == 1)
		{
  			getcarid = GetPlayerVehicleID(playerid);
			GetPlayerName(playerid, playername, sizeof(playername));
			GetVehiclePos(carid, x, y, z);
			GetVehicleZAngle(carid, a);
          	if(getcarid == carid)
			{
				CarInfo[carid][cLocationx] = x;
				CarInfo[carid][cLocationy] = y;
				CarInfo[carid][cLocationz] = z;
				CarInfo[carid][cAngle] = a;
				GameTextForPlayer(playerid, "Your vehicle will respawn here.", 10000, 3);
				OnPropUpdate();
				OnPlayerUpdate(playerid);
                DestroyVehicle(carid);
				CreateVehicle(CarInfo[carid][cModel],CarInfo[carid][cLocationx],CarInfo[carid][cLocationy],CarInfo[carid][cLocationz],CarInfo[carid][cAngle],CarInfo[carid][cColorOne],CarInfo[carid][cColorTwo],60000);
				TogglePlayerControllable(playerid,1);
				SaveCars();
				return true;
  			}
			return true;
		}
		return true;
	}
But where is the bug? I do not know when I give /autoestacionar the vehicle or face moves nothing happens, I tried to get more gamemodes did not work, someone help me is urgent and important personal? !!
Reply


Messages In This Thread
Buggy command - by SukMathcuck - 06.09.2014, 20:32
Re: Buggy command - by The__ - 06.09.2014, 21:18
Re: Buggy command - by SukMathcuck - 06.09.2014, 21:49

Forum Jump:


Users browsing this thread: 2 Guest(s)