01.09.2012, 23:55
Hello.
I am in middle of a personal project of scripting a server from scratch, I've made factions and what not and the first job I'm making is trucking. I'm well into it, however I'd like the trailer to despawn as I deliver the truck. At the moment this happens:
[ame]http://www.youtube.com/watch?v=9Yl782Ayfbk[/ame]
Is there a way to get the trailer despawned aswell?
This is my current code:
I am in middle of a personal project of scripting a server from scratch, I've made factions and what not and the first job I'm making is trucking. I'm well into it, however I'd like the trailer to despawn as I deliver the truck. At the moment this happens:
[ame]http://www.youtube.com/watch?v=9Yl782Ayfbk[/ame]
Is there a way to get the trailer despawned aswell?
This is my current code:
pawn Code:
if(truckloaded[playerid] == 2 && CPT[playerid] == 3)
{
SendClientMessage(playerid, COLOR_GREEN, "You've returned the truck. You got a skill point and $50 extra.");
PlayerInfo[playerid][pCash] += 50;
PlayerInfo[playerid][pTruckerSkill] += 1;
truckloaded[playerid] = 0;
DisablePlayerCheckpoint(playerid);
CPT[playerid] = 0;
new vehicleid = GetPlayerVehicleID(playerid);
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(IsATruck(vehicleid)) SetVehicleToRespawn(vehicleid);
}
return 1;
}