CMD Does not recognize car
#4

Quote:
Originally Posted by Dwane
Посмотреть сообщение
525 is the modelid, you need to use the vehicleid and in that case, you should create the vehicle with a name and use that in the function.
pawn Код:
// Example:

// Global variable
new
    mechanic_veh
;

// Somewhere you create the vehicle
mechanic_veh = CreateVehicle(525 ... /* rest of params */);

// to that command
if(!IsPlayerInVehicle(playerid, mechanic_veh)) return SendClientMessage(playerid, 0xE0313AFF, "(( [Mechanic] You are not in a mechanics vehicle! ))");
You should also check if he is driver to use the command, because he might be passenger.
like this?

pawn Код:
new
    mechanic_veh
;

public OnFilterScriptInit()
{
    mechanic_veh = CreateVehicle(525,2475.3677,-2114.7422,13.3108,2.6581,129,135,60); // mechcar1
    mechanic_veh = CreateVehicle(525,2480.3181,-2114.5127,13.3162,2.6571,129,135,60); // mechcar2
    mechanic_veh = CreateVehicle(525,2485.0183,-2114.2949,13.3213,2.6560,129,135,60); // mechcar3
    mechanic_veh = CreateVehicle(525,2490.4072,-2114.0449,13.3223,2.6560,129,135,60); // mechcar4
    mechanic_veh = CreateVehicle(525,2497.4038,-2113.7207,13.3236,2.6560,129,135,60); // mechcar5
    mechanic_veh = CreateVehicle(525,2504.9688,-2113.3699,13.3250,2.6560,129,135,60); // mechcar6
    mechanic_veh = CreateVehicle(525,2511.7051,-2113.0574,13.3262,2.6560,129,135,60); // mechcar7
    CreatePickup(1239,1,2460.5691,-2118.7847,13.5530,0); // repair pickup
    Create3DTextLabel("(( Repair your vehicle here for $175, /repairvehicle ))", 0xEB0C0FFF, 2460.5691,-2118.7847,13.5530, 30.0, 0, 0); //repair label
    CreatePickup(1239,1,2451.0056,-2118.1301,13.5469,0); // startwork pickup
    Create3DTextLabel("(( Start working as mechanic, /startmech ))", 0xEB0C0FFF, 2451.0056,-2118.1301,13.5469, 30.0, 0, 0); //startwork label
}
Reply


Messages In This Thread
CMD Does not recognize car - by NicholasA - 24.12.2012, 10:00
Re: CMD Does not recognize car - by Konstantinos - 24.12.2012, 10:06
Re: CMD Does not recognize car - by Hiddos - 24.12.2012, 10:12
Re: CMD Does not recognize car - by NicholasA - 24.12.2012, 10:15
Re: CMD Does not recognize car - by Konstantinos - 24.12.2012, 10:21

Forum Jump:


Users browsing this thread: 2 Guest(s)