What wrong with these code , help :(
#7

Код:
CMD:layhangraxe(playerid, params[])
{
	new carid = GetPlayerVehicleID(playerid),closestcar = GetClosestCar(playerid, carid);
	if(IsPlayerInRangeOfVehicle(playerid, closestcar, 6.0) && IsAMatsCar(closestcar))
	{
		new engine,lights,alarm,doors,bonnet,boot,objective;
		GetVehicleParamsEx(closestcar,engine,lights,alarm,doors,bonnet,boot,objective);
		if(boot == VEHICLE_PARAMS_OFF || boot == VEHICLE_PARAMS_UNSET)
		{
			SendClientMessageEx(playerid, COLOR_GRAD1, "Cop cua chiec xe can duoc mo.");
			return 1;
		}
		if(PlayerInfo[playerid][pWins] == 0)
		return SendClientMessageEx(playerid, COLOR_GREEN, " Ban chua dat hang len chiec xe ");
		if(PlayerInfo[playerid][pWins] = 1)
		{
			ApplyAnimation(playerid,"BOMBER","BOM_Plant",4.0,0,0,0,0,0);
			ApplyAnimation(playerid,"BOMBER","BOM_Plant",4.0,0,0,0,0,0);
			PlayerInfo[playerid][pHeroin] = 1;
			PlayerInfo[playerid][pWins] = 0;
			ApplyAnimation(playerid,"BOMBER","BOM_Plant",4.0,0,0,0,0,0);
			ApplyAnimation(playerid,"BOMBER","BOM_Plant",4.0,0,0,0,0,0);
			ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 1, 1, 1, 1, 1);
			SendClientMessageEx(playerid,COLOR_GREY," Ban dang lay hang ra khoi xe !");
			SetPlayerAttachedObject( playerid, 0, 3800, 1, -0.064613, 0.520760, 0.000000, 0.000000, 84.217391, 0.000000, 1.000000, 1.000000, 1.000000 );
		}
		else
		{
			SendClientMessageEx(playerid, COLOR_GRAD1, "Ban khong gan mot chiec xe cho vat lieu.");
		}
	}
	return 1;
}
Код:
CMD:dathanglenxe(playerid, params[])
{
	if(PlayerInfo[playerid][pPaper] < 1)
	{
		SendClientMessageEx(playerid,COLOR_GREY," Ban chua lay hang hoa de len xe !");
	}
	new carid = GetPlayerVehicleID(playerid),closestcar = GetClosestCar(playerid, carid);
	if(IsPlayerInRangeOfVehicle(playerid, closestcar, 6.0) && IsAMatsCar(closestcar))
	{
		new engine,lights,alarm,doors,bonnet,boot,objective;
		GetVehicleParamsEx(closestcar,engine,lights,alarm,doors,bonnet,boot,objective);
		if(boot == VEHICLE_PARAMS_OFF || boot == VEHICLE_PARAMS_UNSET)
		{
			SendClientMessageEx(playerid, COLOR_GRAD1, "Cop cua chiec xe can duoc mo.");
			return 1;
		}
		PlayerInfo[playerid][pWins] = 1;
		ApplyAnimation(playerid,"BOMBER","BOM_Plant",4.0,0,0,0,0,0);
		ApplyAnimation(playerid,"BOMBER","BOM_Plant",4.0,0,0,0,0,0);
		for(new x;x<MAX_PLAYERTOYS;x++)
		{
			RemovePlayerAttachedObject(playerid, x);
		}
	}
	else
	{
		SendClientMessageEx(playerid, COLOR_GRAD1, "Ban khong gan mot chiec xe cho vat lieu.");
	}
	return 1;
}
Reply


Messages In This Thread
What wrong with these code , help :( - by LuisPark - 08.06.2015, 12:30
Re: What wrong with these code , help :( - by LuisPark - 08.06.2015, 12:38
Re: What wrong with these code , help :( - by mamorunl - 08.06.2015, 12:42
Re: What wrong with these code , help :( - by LuisPark - 08.06.2015, 12:43
Re: What wrong with these code , help :( - by JaydenJason - 08.06.2015, 12:57
Re: What wrong with these code , help :( - by LuisPark - 08.06.2015, 14:06
Re: What wrong with these code , help :( - by JaydenJason - 08.06.2015, 14:32

Forum Jump:


Users browsing this thread: 3 Guest(s)