SA-MP Forums Archive
OnVehicleStreamIn Problem - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: OnVehicleStreamIn Problem (/showthread.php?tid=130998)



OnVehicleStreamIn Problem - Naruto4 - 01.03.2010

My cars get locked sometimes and i heard i have to repeat my /lock under onvehiclestreamin but i dont know how.

Код:
//----------------------------------------------------------------------------------------
  if (strcmp(cmdtext, "/lock", true)==0)
	{
		if(IsPlayerInAnyVehicle(playerid))
		{
      new State;
      new Float:X, Float:Y, Float:Z;
			State=GetPlayerState(playerid);
			if(State!=PLAYER_STATE_DRIVER)
			{
				SendClientMessage(playerid,GREY,"You are not on the driver seet.");
				return 1;
			}
			new i;
			for(i=0;i<MAX_PLAYERS;i++)
			{
				if(i != playerid)
				{
					SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 1);
				}
			}
			SendClientMessage(playerid, GREY, "[VEHICLE] Locked.");
			GetPlayerPos(playerid,X,Y,Z);
			PlayerPlaySound(playerid,1056,X,Y,Z);
		}
		else
		{
			SendClientMessage(playerid, GREY, "You're not in a vehicle!");
		}
		return 1;
	}



Re: OnVehicleStreamIn Problem - Naruto4 - 01.03.2010

bump


Re: OnVehicleStreamIn Problem - Correlli - 01.03.2010

There's an example here.