16.11.2018, 18:15
Greetings, I would like to know how I could do so that when a trailer is attached to a trailer, try to do this but it does not work:
Code:
forward OnPlayerAttachTrailer(playerid, vehicleid, trailerid); public OnPlayerAttachTrailer(playerid, vehicleid, trailerid) { if(!IsTrailerAttachedToVehicle(vehicleid)) { } if(pInfo[playerid][pLevel] > 2) { if(GetPVarInt(playerid, "TRUCK_MERCH") == 1) { new Tipe[20]; switch(GetVehicleModel(trailerid)) { case 435: Tipe = "Cereal"; } SetPlayerCheckpoint(playerid, -2457.8601,2291.7852,5.0990, 7); SetPVarInt(playerid, "TRUCK_MERCH", 2); DeletePVar(playerid, "TRUCK_GO"); c_clvl2_e1_b = false; SendClientMessage(playerid, -1, "Go to the checkpoint"); RemovePlayerMapIcon(playerid, CEREAL_DEPOSIT); SetPVarInt(playerid, "TRUCK_GOING", 2); } } return 1; }