08.06.2015, 12:30
Code 1 :
Code 2 :
please help
PHP код:
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;
}
PHP код:
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;
}