[HELP] petrol tanker and article trailer - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP] petrol tanker and article trailer (
/showthread.php?tid=491429)
[HELP] petrol tanker and article trailer -
Luca12 - 30.01.2014
Hello I just want ask how can I respawn this two trailer but if they not attached to the trunk if you know what I mean and if they attached to the trunk and I make respawn for trailers then I want that these trailers doesn't respawn I just want respawn non attached(free) trailers if you know what I mean? Thanks
Re: [HELP] petrol tanker and article trailer -
Luca12 - 31.01.2014
anyone? thanks
Re: [HELP] petrol tanker and article trailer -
Smileys - 31.01.2014
https://sampwiki.blast.hk/wiki/IsTrailerAttachedToVehicle
Re: [HELP] petrol tanker and article trailer -
Excelize - 31.01.2014
Try this:
pawn Код:
if(!strcmp(cmdtext, "/respawncar", true))
{
for(new i = 0; i < MAX_VEHICLES; i++)
{
SetVehicleToRespawn(i);
}
return 1;
}
Re: [HELP] petrol tanker and article trailer -
Luca12 - 31.01.2014
not like this
Re: [HELP] petrol tanker and article trailer -
Kyance - 31.01.2014
pawn Код:
CMD:respawntrailers(playerid, params[]) {
for(new i=0;i<MAX_VEHICLES;i++) //Loops trough the vehicles
{
if(GetVehicleModel(i) == 435 || GetVehicleModel(i) == 450 || GetVehicleModel(i) == 584 || GetVehicleModel(i) == 591) //if the vehicle is a trailer ( TRUCK TRAILER )
{
if(!IsTrailerAttachedToVehicle(i)) //If the trailer is NOT attached to a truck/vehicle
{
SetVehicleToRespawn(i); //sets the vehicle to respawn
}
}
}
new sender[MAX_PLAYER_NAME];
GetPlayerName(playerid, sender, sizeof(sender));
new string[84];
format(string, sizeof(string), "[INFO] - %s[%d] has respawned all of the Un-Attached trailers!", sender, playerid);
SendClientMessageToAll(0xFFFF00AA, string);
return 1;
}
I suppose this is what you wanted?
Not tested ..
Re: [HELP] petrol tanker and article trailer -
Luca12 - 31.01.2014
yes but that respawn and attached trailers and free trailers I mean trailers that is not attached to the trunk
Re: [HELP] petrol tanker and article trailer -
Luca12 - 01.02.2014
anyone? Thanks
Re: [HELP] petrol tanker and article trailer -
Luca12 - 02.02.2014
anyone?thanks
Re: [HELP] petrol tanker and article trailer -
Beckett - 03.02.2014
Quote:
Originally Posted by Luca12
yes but that respawn and attached trailers and free trailers I mean trailers that is not attached to the trunk
|
This makes no sense, you want to RESPAWN the trailers or the trucks?