CMD:towcar
#1

hei all, i make a command for members TCC to can park personal players vehicles but not work, what is't wrong ? i try everyting
PHP код:
CMD:towpark(playeridparams[])
{
    if(
gPlayerLogged[playerid] == 0) return SendClientMessage(playeridCOLOR_LIGHTRED"Trebuie sa te loghezi mai intai.");
    if(
PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == 8) return SCM(playerid,-1,"Nu esti mebru TCC.");
    
    new 
engine,lights,alarm,doors,bonnet,boot,objective;
    new 
Float:x,Float:y,Float:z,Float:a,getcarid;
    
getcarid GetPlayerVehicleID(playerid);
    
GetVehiclePos(getcaridxyz);
    
GetVehicleZAngle(getcarida);
    
            new 
Float:health2;
            
GetVehicleHealth(getcaridhealth2);
            if(
health2 600.0) return SCM(playerid,COLOR_WHITE,"{ED2D20}Please repair your car.");
            if(
getcarid == personalcar[playerid])
            {
                
CarInfo[OwnedVeh(getcarid)][cLocationx] = x;
                
CarInfo[OwnedVeh(getcarid)][cLocationy] = y;
                
CarInfo[OwnedVeh(getcarid)][cLocationz] = z;
                
CarInfo[OwnedVeh(getcarid)][cAngle] = a;
                
DestroyVehicle(personalcar[playerid]);
                new 
created OwnedVeh(getcarid);
                
OwnedVeh(getcarid) = 0;
                 new 
car CreateVehicle(CarInfo[created][cModel],CarInfo[created][cLocationx],CarInfo[created][cLocationy],CarInfo[created][cLocationz]+1.0,CarInfo[created][cAngle],CarInfo[created][cColorOne],CarInfo[created][cColorTwo],500000);
                
OwnedVeh(car) = created;
                
personalcar[playerid] = car;
                
PutPlayerInVehicleEx(playerid,car,0);
                new 
carplate[25];
                
format(carplatesizeof(carplate), "%s",CarInfo[OwnedVeh(car)][cLicense]);
                
SetVehicleNumberPlate(carcarplate);
                  
SetVehicleHealth(carhealth2);
                  
vehEngine[car] = 0;
                
GetVehicleParamsEx(car,engine,lights,alarm,doors,bonnet,boot,objective);
                  
SetVehicleParamsEx(car,VEHICLE_PARAMS_OFF,lights,alarm,CarInfo[PlayerInfo[playerid][pPcarkey]][cLock],bonnet,boot,objective);
                
SetPVarInt(playerid"Engine"0);
                
vUpdate(OwnedVeh(car),cLocationxx);
                
vUpdate(OwnedVeh(car),cLocationyx);
                
vUpdate(OwnedVeh(car),cLocationzx);
                
vUpdate(OwnedVeh(car),cAnglex);
                
ModVehicle(car);
                
SendClientMessage(playeridCOLOR_WHITE"Car was parked successfully.");
                return 
1;
            }
        
    return 
1;

Reply
#2

You are using a lot of functions there tell can't help without seeing those...
Reply
#3

anybody ? ~!!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)