10.01.2010, 10:14
Hmm, I've seen A LOT of people make this mistake.
GetPlayerVehicleID doesn't get the model ID, which is what your using, it gets the vehicle ID as per the script. (Example: The first car to be created = 1.)
Use GetVehicleModel as well, before saving it to a variable.
https://sampwiki.blast.hk/wiki/GetVehicleModel
Example:
GetPlayerVehicleID doesn't get the model ID, which is what your using, it gets the vehicle ID as per the script. (Example: The first car to be created = 1.)
Use GetVehicleModel as well, before saving it to a variable.
https://sampwiki.blast.hk/wiki/GetVehicleModel
Example:
Код:
public OnPlayerEnterCheckpoint(playerid)
{
new vehicleid;
new vehicle;
vehicleid = GetPlayerVehicleID(playerid);
vehicle = GetVehicleModel(vehicleid);
if (vehicle == 403) // linerunner id
{
if(IsTrailerAttachedToVehicle(vehicleid))
{
GivePlayerMoney(playerid, 800);
SendClientMessage(playerid, 0xAFAFAFAA,"You have deliver your trailer succesfully, you get 800 dollar for it");
return 1;
}
else
{
SendClientMessage(playerid, 0xAFAFAFAA,"You're not in a truck with a trailer!");
return 1;
}
}
else
{
SendClientMessage(playerid, 0xAFAFAFAA,"You're not in a truck!");
return 1;
}
}

