25.03.2009, 13:22
how can i make that if the truck pickups a trailer it does a funcion?
Ps: sry can't talk good in english
Ps: sry can't talk good in english
forward TrailerAttaching(playerid);
new TrailerTimer;
public TrailerAttaching(playerid)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
{
SendClientMessage(playerid,COLOR_WHITE,"A trailer has been attached to your vehicle!");
KillTimer(TrailerTimer);
}
}
}
if(!IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
{
TrailerTimer = SetTimer("TrailerAttaching",1000,true);
}