Lock by Dissconect
#1

Hello i want when i locked my car and i go offline or die in my car, the doors automatic open

Here my script


Код:
if(!strcmp(cmdtext,"/lock"))
	{
	new Float:VX,Float:VY,Float:VZ;
	for(new vehicleid=1;vehicleid<MAX_VEHICLES;vehicleid++)
	{
	    GetVehiclePos(vehicleid,VX,VY,VZ);
	    if(!IsPlayerInRangeOfPoint(playerid,2.5,VX,VY,VZ))continue;
		if(Lock[vehicleid] == 0)
		{
		    Lock[vehicleid] = 1;
		    SendClientMessage(playerid,COLOR_GREEN," Car closed.");
		    break;
		}
		if(Lock[vehicleid] == 1)
		{   
		    Lock[vehicleid] = 0;
		    SendClientMessage(playerid,COLOR_GREEN," Car open.");
		    break;
		}
	}
	return 1;
	}
Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
	if (Lock[vehicleid] == 1)
	{
		{
		Lock[vehicleid] = 0;
		SendClientMessage(playerid,COLOR_GREEN," Car open.");
		}
	}
}
Reply


Messages In This Thread
Lock by Dissconect - by SanAndreasVille - 26.01.2011, 14:22
Re: Lock by Dissconect - by Mauzen - 26.01.2011, 17:07
Re: Lock by Dissconect - by SanAndreasVille - 26.01.2011, 17:58
Re: Lock by Dissconect - by Mauzen - 26.01.2011, 20:33
Re: Lock by Dissconect - by SanAndreasVille - 26.01.2011, 22:00

Forum Jump:


Users browsing this thread: 4 Guest(s)