A few Requests
#1

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.
Reply
#2

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
Reply
#3

@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.
Reply
#4

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);
Reply
#5

Respawn Delay:

Respawn Delay, Read this
Reply
#6

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 )
Reply
#7

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;
}
Reply
#8

Thanks alot Kitten!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)