Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Car Respawn by Jason
- #include <a_samp>
- public OnFilterScriptInit()
- {
- SetTimer("VehicleRespawn",1800000, 1); // 30 Minuten Timer
- print("Automatic Car Respawn by Jason.J (Jason Stylezz)");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- forward VehicleRespawn();
- public VehicleRespawn() {
- print("SERVER: Fahrzeuge wurden Respawnt.");
- for(new i = 0; i < MAX_VEHICLES; i ++ ) {
- for(new o = 0; o < GetMaxPlayers(); o ++ ) {
- if(!IsPlayerConnected(o)) continue;
- if(IsAnyBodyInVehicle(i)) continue;
- SetVehicleToRespawn(i);
- }
- }
- return 1;
- }
- stock IsAnyBodyInVehicle(vid) {
- for(new i = 0; i < GetMaxPlayers(); i ++ ) {
- if(IsPlayerInVehicle(i, vid)) return 1;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement