A few Requests - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: A few Requests (
/showthread.php?tid=271144)
A few Requests -
Azzeto - 23.07.2011
Hello, i'm here to ask a few more questions on my gamemode.
1.Auto-Repair, I want to know how I can make it so the vehicle will auto repair after being damaged
2.I want it so a vehicle will be destroyed after a player is not in it for 5 seconds.
Thank you for the help in advanced.
Re: A few Requests -
Kitten - 23.07.2011
1.
https://sampforum.blast.hk/showthread.php?tid=72919
https://sampforum.blast.hk/showthread.php?tid=49981
https://sampforum.blast.hk/showthread.php?tid=122060
2.
AddStaticVehicleEx
Re: A few Requests -
Azzeto - 23.07.2011
@Kitten
1.i'm not using AddStaticVehicle, I'm using CreateVehicle with a dialog
2.I need to know how to add the Auto-Repair into my gamemode, I'm not going to use filterscripts.
3.Respawn time respawns it from where you spawned it at, I need it to DESPAWN.
Thanks for the reply though.
Re: A few Requests -
Kitten - 23.07.2011
pawn Код:
SetTimerEx("RepairNao",500,true,"i",playerid);
forward RepairNao ( playerid ) ;
public RepairNao ( playerid) {
RepairVehicle ( GetPlayerVehicleID ( playerid ) );
SetVehicleHealth ( GetPlayerVehicleID ( playerid ), 9999.0 );
return 1;
}
CreateVehicle(modelid, Float
, Float:y, Float:z, Float:angle, color1, color2,
respawn_delay);
Re: A few Requests -
Shockey HD - 23.07.2011
Respawn Delay:
Respawn Delay, Read this
Re: A few Requests -
Azzeto - 23.07.2011
Yes, the Respawn Delay, I know of that, Thats spawns the vehicle back from where the players spawned it from the dialog.
and @Kitten, where do I put that ( im a new scripter )
Re: A few Requests -
Kitten - 23.07.2011
Quote:
Originally Posted by Azzeto
Yes, the Respawn Delay, I know of that, Thats spawns the vehicle back from where the players spawned it from the dialog.
|
Then make a variable for the car they spawn for example
pawn Код:
new Car;
Car = CreateVehicle(blahahahah);
DestroyVehicle(car); // this destroys the car they spawned but delete it after the exit the car but set a timer for the amount of seconds you want to return in the car before it deletes the car.
EDIT: you asked where to put this
pawn Код:
SetTimerEx("RepairNao",500,true,"i",playerid);
forward RepairNao ( playerid ) ;
public RepairNao ( playerid) {
RepairVehicle ( GetPlayerVehicleID ( playerid ) );
SetVehicleHealth ( GetPlayerVehicleID ( playerid ), 9999.0 );
return 1;
}
easy
pawn Код:
SetTimerEx("RepairNao",500,true,"i",playerid); // OnGameModeInit
forward RepairNao ( playerid ) ; // On Top of script
public RepairNao ( playerid) { // Any where in script not in a callback. like bottom of your script works.
RepairVehicle ( GetPlayerVehicleID ( playerid ) );
SetVehicleHealth ( GetPlayerVehicleID ( playerid ), 9999.0 );
return 1;
}
Re: A few Requests -
Azzeto - 23.07.2011
Thanks alot Kitten!