SA-MP Forums Archive
Bugs of respawn - 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)
+--- Thread: Bugs of respawn (/showthread.php?tid=442812)



Bugs of respawn - yaron0600 - 09.06.2013

Hey , Always on my server only for Factions vehicles , When u exit only for 1/5 seconds the car dessaper wheres the problem should be ?


Re: Bugs of respawn - IceMeteor - 09.06.2013

Код:
AddStaticVehicle(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:angle, color1, color2, respawn_delay)
maybe the respawn delay, or on your OnPlayerExitVehice


Re: Bugs of respawn - yaron0600 - 09.06.2013

This is the code : Maybe you can fix that wont be respawn ? :

Код:
 

public OnPlayerExitVehicle(playerid, vehicleid)
{

	if (GetPlayerState(playerid) == 1)
	{
		return 1;
	}

	// Seatbelt Check
	switch(Seatbelt[playerid])
	{
	    case 1:
	    {
			new string[128];
	        if(IsABike(vehicleid))
			{
				SendClientMessageEx(playerid, COLOR_WHITE, "You have taken off your helmet.");
				format(string, sizeof(string), "* %s reaches for their helmet, and takes it off.", GetPlayerNameEx(playerid));
			}
			else
			{
				SendClientMessageEx(playerid, COLOR_WHITE, "You have taken off your seatbelt.");
				format(string, sizeof(string), "* %s reaches for their seatbelt, and unbuckles it.", GetPlayerNameEx(playerid));
			}
			ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  			Seatbelt[playerid] = 0;
	    }
	}

	if(GetPVarInt(playerid, "rccam") == 1)
	{
		DestroyVehicle(GetPVarInt(playerid, "rcveh"));
	    SetPlayerPos(playerid, GetPVarFloat(playerid, "rcX"), GetPVarFloat(playerid, "rcY"), GetPVarFloat(playerid, "rcZ"));
		DeletePVar(playerid, "rccam");
	    KillTimer(GetPVarInt(playerid, "rccamtimer"));
	}
	return 1;
}