Got a problem with CreateVehicle
#1

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:

Код:
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;
}
Beer is waiting

Reply


Messages In This Thread
Got a problem with CreateVehicle - by Libra_PL - 26.02.2011, 18:01
Re: Got a problem with CreateVehicle - by Libra_PL - 26.02.2011, 19:51
Re: Got a problem with CreateVehicle - by Lethaal - 26.02.2011, 19:52
Re: Got a problem with CreateVehicle - by alpha500delta - 26.02.2011, 20:05

Forum Jump:


Users browsing this thread: 1 Guest(s)