What wrong with these code , help :(
#1

Code 1 :
PHP код:
CMD:layhangraxe(playeridparams[])
{
    new 
carid GetPlayerVehicleID(playerid),closestcar GetClosestCar(playeridcarid);
    if(
IsPlayerInRangeOfVehicle(playeridclosestcar6.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(playeridCOLOR_GRAD1"Cop cua chiec xe can duoc mo.");
            return 
1;
        }
        if(
PlayerInfo[playerid][pWins] == 0)
        return 
SendClientMessageEx(playeridCOLOR_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.011111);
        
SendClientMessageEx(playerid,COLOR_GREY," Ban dang lay hang ra khoi xe !");
        
SetPlayerAttachedObjectplayerid038001, -0.0646130.5207600.0000000.00000084.2173910.0000001.0000001.0000001.000000 );
        }
    else
    {
        
SendClientMessageEx(playeridCOLOR_GRAD1"Ban khong gan mot chiec xe cho vat lieu.");
    }
    }
    return 
1;

Code 2 :
PHP код:
CMD:dathanglenxe(playeridparams[])
{
    if(
PlayerInfo[playerid][pPaper] < 1)
    {
        
SendClientMessageEx(playerid,COLOR_GREY," Ban chua lay hang hoa de len xe !");
    }
    new 
carid GetPlayerVehicleID(playerid),closestcar GetClosestCar(playeridcarid);
    if(
IsPlayerInRangeOfVehicle(playeridclosestcar6.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(playeridCOLOR_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(playeridx);
        }
    }
    else
    {
        
SendClientMessageEx(playeridCOLOR_GRAD1"Ban khong gan mot chiec xe cho vat lieu.");
    }
    }
    return 
1;

please help
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: 2 Guest(s)