if( GetVehicleModel( GetVehicleTrailer( vehicleid ) ) ==584)
{
return SendClientMessage( playerid, -1, "fuel trailer attached !" );
}
PHP код:
|
dcmd_work(playerid, params[])
if( GetVehicleModel( GetVehicleTrailer( vehicleid ) ) ==584) { return SendClientMessage( playerid, -1, "Haul Fuel from [LS]Los Santos to [SF]San Fierro with Petrol Trailer!" ); } else if( GetVehicleModel( GetVehicleTrailer( vehicleid ) ) ==435) { return SendClientMessage( playerid, -1, " Haul Drills from [SF]San Fierro to [LS]Los Santos with Cargo Trailer" ); } else { return SendClientMessage( playerid, -1, "You Don't have a Trailer!" ); }
Under
Код:
dcmd_work(playerid, params[]) Код:
if( GetVehicleModel( GetVehicleTrailer( vehicleid ) ) ==584) { return SendClientMessage( playerid, -1, "Haul Fuel from [LS]Los Santos to [SF]San Fierro with Petrol Trailer!" ); } else if( GetVehicleModel( GetVehicleTrailer( vehicleid ) ) ==435) { return SendClientMessage( playerid, -1, " Haul Drills from [SF]San Fierro to [LS]Los Santos with Cargo Trailer" ); } else { return SendClientMessage( playerid, -1, "You Don't have a Trailer!" ); } Use https://sampwiki.blast.hk/wiki/Vehicles:Trailers |
new trailer[12];//You can increase or decrease the amount of variable.
//Normal Trailers
trailer[0] = AddStaticVehicle(435, Float:x, Float:y, Float:z, Float:angle, -1, -1);
trailer[1] = AddStaticVehicle(435, Float:x, Float:y, Float:z, Float:angle, -1, -1);
trailer[2] = AddStaticVehicle(435, Float:x, Float:y, Float:z, Float:angle, -1, -1);
trailer[3] = AddStaticVehicle(435, Float:x, Float:y, Float:z, Float:angle, -1, -1);
trailer[4] = AddStaticVehicle(435, Float:x, Float:y, Float:z, Float:angle, -1, -1);
trailer[5] = AddStaticVehicle(435, Float:x, Float:y, Float:z, Float:angle, -1, -1);
//Fuel Trailers
trailer[6] = AddStaticVehicle(584, Float:x, Float:y, Float:z, Float:angle, -1, -1);
trailer[7] = AddStaticVehicle(584, Float:x, Float:y, Float:z, Float:angle, -1, -1);
trailer[8] = AddStaticVehicle(584, Float:x, Float:y, Float:z, Float:angle, -1, -1);
trailer[9] = AddStaticVehicle(584, Float:x, Float:y, Float:z, Float:angle, -1, -1);
trailer[10] = AddStaticVehicle(584, Float:x, Float:y, Float:z, Float:angle, -1, -1);
trailer[11] = AddStaticVehicle(584, Float:x, Float:y, Float:z, Float:angle, -1, -1);
stock NormalTrailer(vehicleid)
{
if(GetVehicleTrailer(vehicleid) == trailer[0] || GetVehicleTrailer(vehicleid) == trailer[1] || GetVehicleTrailer(vehicleid) == trailer[2]) return 1;
if(GetVehicleTrailer(vehicleid) == trailer[3] || GetVehicleTrailer(vehicleid) == trailer[4] || GetVehicleTrailer(vehicleid) == trailer[5]) return 1;
return 0;
}
stock FuelTrailer(vehicleid)
{
if(GetVehicleTrailer(vehicleid) == trailer[6] || GetVehicleTrailer(vehicleid) == trailer[7] ||GetVehicleTrailer(vehicleid) == trailer[8] ||GetVehicleTrailer(vehicleid) == trailer[9]) return 1;
if(GetVehicleTrailer(vehicleid) == trailer[10] || GetVehicleTrailer(vehicleid) == trailer[11]) return 1;
return 0;
}
stock T_NewJob(playerid)
{
new MisRand = random(sizeof(MisLocations));
new vID = GetPlayerVehicleID(playerid);
if(GetVehicleModel(vID)== 403 || GetVehicleModel(vID)== 515 || GetVehicleModel(vID) == 514)
{
if(IsTrailerAttachedToVehicle(vID))
{
if(NormalTrailer(vID))//Its Normal Trailer
{
//Your code for Normal Trailer
}
else if(FuelTrailer(vID))
{
//Your code for Fuel Trailer
}
}
else
{
SendClientMessage(playerid, -1, "You need a trailer!");
}
}
else
{
SendClientMessage(playerid, -1, "You must be in a Truck to perform this!");
}
return 1;
}
It is okay that i am little clucker, but i do not post just to get post, but do you post just to get higher amount of posts? Did you ever read the description?
|
It is okay that i am little clucker, but i do not post just to get post, but do you post just to get higher amount of posts? |
Did you ever read the description? |
Trying to help.. you didn't even tell where to put them.
What description? |