26.02.2011, 18:01
Sup! I've got a next problem, I don't know what's wrong with that! I made a vehicle spawning system, but I don't know whats wrong with CreateVehicle. I added respawn time in 2 seconds, but it respawns after ~8 seconds. Could anyone tell also how to add vehicle respawn after players leave the vehicle? If I put 0 seconds, it doesn't respawn, and I can't put 0.2 seconds or something after dot). Here's a script of vehicle spawning:
Beer is waiting 
Код:
forward SpawnVehicle(playerid,model); public SpawnVehicle(playerid,model) { if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, red, "ERROR: You are in a vehicle, you cannot spawn another if you are inside!"); new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid = CreateVehicle(model, x, y, z, angle, -1, -1, 2); PutPlayerInVehicle(playerid, vehicleid, 0); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); VehicleDestroy[vehicleid] = true; return 1; }

