SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 16/02/2010, 10:49 AM   #1
cssbart
Huge Clucker
 
Join Date: Nov 2009
Location: United Kingdom, Kenilworth
Posts: 210
Reputation: 0
Default auto gates need

so when you go up to them they open

the co ords are

"close" is then there not open so they are blocking
"open" is when they stop moving

Code:
CreateObject(971, -1635.5618896484, 688.14025878906, 9.757417678833, 0.000000, 0.000000, 0.000000); //close 1
CreateObject(971, -1635.5615234375, 688.1396484375, 2.507417678833, 0.000000, 0.000000, 0.000000); //open 1
CreateObject(971, -1626.7897949219, 688.58380126953, 9.757417678833, 0.000000, 0.000000, 0.000000); //close 2
CreateObject(971, -1626.7890625, 688.5830078125, 2.257417678833, 0.000000, 0.000000, 0.000000); //open 2
CreateObject(975, -1573.0546875, 662.7529296875, 7.8621897697449, 0.000000, 0.000000, 88.055419921875); //close 4
CreateObject(975, -1573.0546875, 662.7529296875, 4.6121897697449, 0.000000, 0.000000, 88.055419921875); //open 4
CreateObject(975, -1701.4654541016, 684.09387207031, 25.537664413452, 0.000000, 0.000000, 270.67565917969); //close 3
CreateObject(975, -1701.46484375, 684.09375, 22.287664413452, 0.000000, 0.000000, 270.67565917969); //open 3
__________________
cssbart is offline  
Old 16/02/2010, 11:03 AM   #2
wafffllesss
Huge Clucker
 
Join Date: Apr 2007
Posts: 243
Reputation: 1
Default Re: auto gates need

Quote:
Originally Posted by cssbart
so when you go up to them they open

the co ords are

"close" is then there not open so they are blocking
"open" is when they stop moving

Code:
CreateObject(971, -1635.5618896484, 688.14025878906, 9.757417678833, 0.000000, 0.000000, 0.000000); //close 1
CreateObject(971, -1635.5615234375, 688.1396484375, 2.507417678833, 0.000000, 0.000000, 0.000000); //open 1
CreateObject(971, -1626.7897949219, 688.58380126953, 9.757417678833, 0.000000, 0.000000, 0.000000); //close 2
CreateObject(971, -1626.7890625, 688.5830078125, 2.257417678833, 0.000000, 0.000000, 0.000000); //open 2
CreateObject(975, -1573.0546875, 662.7529296875, 7.8621897697449, 0.000000, 0.000000, 88.055419921875); //close 4
CreateObject(975, -1573.0546875, 662.7529296875, 4.6121897697449, 0.000000, 0.000000, 88.055419921875); //open 4
CreateObject(975, -1701.4654541016, 684.09387207031, 25.537664413452, 0.000000, 0.000000, 270.67565917969); //close 3
CreateObject(975, -1701.46484375, 684.09375, 22.287664413452, 0.000000, 0.000000, 270.67565917969); //open 3
Here
wafffllesss is offline  
Old 17/02/2010, 04:26 PM   #3
cssbart
Huge Clucker
 
Join Date: Nov 2009
Location: United Kingdom, Kenilworth
Posts: 210
Reputation: 0
Default Re: auto gates need

what not it
i want to script allready done
__________________
cssbart is offline  
Old 17/02/2010, 05:13 PM   #4
woot
Gangsta
 
Join Date: Jun 2007
Posts: 785
Reputation: 173
Default Re: auto gates need

http://forum.sa-mp.com/index.php?topic=144062.0
__________________
woop
woot is offline  
Old 17/02/2010, 05:21 PM   #5
aircombat
High-roller
 
Join Date: Feb 2010
Posts: 1,535
Reputation: 9
Default Re: auto gates need

ok there is agategenerator and i attached it , look at the attachements and download it , it should work fine
________
THE CIGAR BOSS

Last edited by aircombat; 08/04/2011 at 09:37 AM.
aircombat is offline  
Old 18/02/2010, 10:57 AM   #6
cssbart
Huge Clucker
 
Join Date: Nov 2009
Location: United Kingdom, Kenilworth
Posts: 210
Reputation: 0
Default Re: auto gates need

Very Nice App but i get one error with the auto gate

Code:
\\DOWNLOADS\server\gamemodes\sf.pwn(96) : warning 217: loose indentation
\\DOWNLOADS\server\gamemodes\sf.pwn(176) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase

1 Error.
the script is
Code:
#include <a_samp>
#include <KIHC>
#include <struct>

// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

//Jonny's Script

new dm1;
forward dm1down(playerid);

new SFPDTop;
forward SFPDTopTimer(playerid);

new sfpdt;
forward sfpdtdown(playerid);

new sfpdb;
forward sfpdbdown(playerid);


public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print("  Freedom/DM/Stunting By Jonny");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}


main()
{
	print("\n----------------------------------");
	print("  Freedom/DM/Stunting By Jonny");
	print("----------------------------------\n");
}


public OnGameModeInit()
{
	// Don't use these lines if it's a filterscript
	SetGameModeText("Freedom/DM/Stunting");
	AddPlayerClass(0,-1753.9595,959.2625,24.8828,180.2193,0,0,0,0,0,0); // player spawn cj
	AddPlayerClass(293,-1753.9595,959.2625,24.8828,180.2193,0,0,0,0,0,0); // Og Loc
	AddPlayerClass(107,-1753.9595,959.2625,24.8828,180.2193,0,0,0,0,0,0); // player spawn Grove Street member
	AddPlayerClass(105,-1753.9595,959.2625,24.8828,180.2193,0,0,0,0,0,0); // player spawn Grove Street member
	AddPlayerClass(106,-1753.9595,959.2625,24.8828,180.2193,0,0,0,0,0,0); // player spawn Grove Street member
	AddPlayerClass(28,-1753.9595,959.2625,24.8828,180.2193,0,0,0,0,0,0); // dont know who he is
	//cars
	AddStaticVehicle(541,-1786.3391,1205.5280,24.7500,178.9352,22,1);
	AddStaticVehicle(436,-2526.2947,1229.4812,37.3960,213.0593,12,12);
	AddStaticVehicle(421,-1758.9066,911.5603,24.6942,88.5318,13,1);
	AddStaticVehicle(411,-2354.5764,1250.2322,28.4569,90.5214,116,1);
	AddStaticVehicle(506,-2722.6880,980.4581,54.1654,2.3510,6,6);
	AddStaticVehicle(567,-1687.3698,1003.5350,17.4535,89.1999,88,64);
	AddStaticVehicle(578,-1787.0021,1216.8849,33.2841,268.0793,1,1);
	AddStaticVehicle(468,-2390.1882,1216.6508,34.3218,275.3025,46,46);
	AddStaticVehicle(581,-2645.7717,1370.3085,6.7637,270.7869,66,1);
	AddStaticVehicle(477,-2644.6333,1332.5770,6.9400,268.8670,94,1);
 	AddStaticVehicle(545,-1753.7076,948.0575,24.5991,91.6215,47,1);
	AddStaticVehicle(451,-1721.4655,980.2755,30.4583,2.8676,61,61); 
	AddStaticVehicle(521,-2133.1162,196.6453,51.1831,269.6657,75,13); 
	AddStaticVehicle(522,-1730.9972,960.7554,25.0718,269.3759,8,82);
	AddStaticVehicle(522,-1776.6486,960.8593,25.0737,90.1190,8,82);
	AddStaticVehicle(434,-2495.3091,1216.3907,37.3868,322.3733,12,12);
	AddStaticVehicle(525,-2479.9646,416.1866,27.3560,138.9263,8,82);
	AddStaticVehicle(525,-2490.1135,424.5793,27.3437,137.3763,8,82);
	AddStaticVehicle(416,-2705.6863,591.5366,14.0238,92.1485,7,1);
	AddStaticVehicle(416,-2707.1382,611.7045,14.0236,87.1527,7,1);
	AddStaticVehicle(420,-2588.6592,622.3329,14.0236,86.8374,6,6);
	AddStaticVehicle(420,-2588.9475,637.5594,14.0167,87.3606,6,6);
	AddStaticVehicle(480,-2572.6128,632.9766,14.0299,268.3483,45,21);
	AddStaticVehicle(500,-2544.7664,604.9912,14.0298,90.9741,96,15);
	AddStaticVehicle(431,-2041.6261,482.7328,34.7397,0.9856,108,1);
	AddStaticVehicle(555,-2408.2747,970.5540,45.1103,179.8658,47,1);
	AddStaticVehicle(513,-1361.5284,-490.1158,13.7149,206.9124,39,106);
	AddStaticVehicle(512,-1439.4449,-533.7003,13.7426,212.5382,39,106);
	AddStaticVehicle(597,-1573.6500,742.6940,-5.4745,90.4325,7,1);
	AddStaticVehicle(597,-1573.8478,714.1404,-5.5358,88.7192,7,1);
	AddStaticVehicle(599,-1611.9218,672.9374,6.8933,179.1680,7,1);
	AddStaticVehicle(599,-1594.1355,673.0961,6.8946,178.0049,7,1);
	AddStaticVehicle(407,-2021.2616,92.8698,27.7104,274.4587,3,1);
	AddStaticVehicle(407,-2020.3599,76.2341,27.6858,276.4792,3,1);
	AddStaticVehicle(490,-1600.0076,692.4629,-5.4725,179.0916,0,0);
	AddStaticVehicle(523,-1589.3365,711.3475,-5.6739,272.8195,7,1);
	AddStaticVehicle(523,-1589.8573,706.1879,-5.6645,268.4362,7,1);
//
//DM ZONE
dm1=CreateObject(3109,-3938.7331542969,-1190.4425048828,47.598243713379,0.000000,85.840026855469,89.529968261719); //
CreateObject(4652, -3966.5456542969, -1140.9321289063, 46.328544616699, 0.000000, 0.000000, 0.000000); //
CreateObject(4652, -3966.5625, -1155.7919921875, 46.328544616699, 0.000000, 0.000000, 0.000000); //
CreateObject(4652, -3966.5029296875, -1170.470703125, 46.328544616699, 0.000000, 0.000000, 0.000000); //
CreateObject(4652, -3966.65625, -1185.0390625, 46.328544616699, 0.000000, 0.000000, 0.000000); //
CreateObject(4652, -3927.9206542969, -1192.1214599609, 87.25422668457, 0.000000, 91.045043945313, 90.530029296875); //
CreateObject(4652, -3945.83984375, -1192.2421875, 87.25422668457, 0.000000, 91.043701171875, 90.52734375); //
CreateObject(4652, -3964.3518066406, -1192.7954101563, 87.25422668457, 0.000000, 91.045043945313, 90.530029296875); //
CreateObject(4652, -3982.3891601563, -1192.9606933594, 87.25422668457, 0.000000, 91.293701171875, 89.52734375); //
CreateObject(4652, -4000.0793457031, -1193.0181884766, 87.25422668457, 0.000000, 91.290893554688, 89.522094726563); //
CreateObject(4652, -4008.3525390625, -1185.6494140625, 87.25422668457, 0.000000, 91.285400390625, 359.01672363281); //
CreateObject(4652, -4008.26171875, -1170.453125, 87.25422668457, 0.000000, 91.279907226563, 359.01123046875); //
CreateObject(4652, -4008.419921875, -1155.8212890625, 87.25422668457, 0.000000, 91.279907226563, 359.01123046875); //
CreateObject(4652, -4008.3869628906, -1140.5666503906, 87.25422668457, 0.000000, 91.285400390625, 359.01672363281); //
CreateObject(4652, -4002.130859375, -1130.86328125, 87.25422668457, 0.000000, 89.533081054688, 270.76354980469); //
CreateObject(4652, -3983.4130859375, -1130.8544921875, 87.25422668457, 0.000000, 89.527587890625, 267.7587890625); //
CreateObject(4652, -3950.2607421875, -1131.55859375, 87.25422668457, 0.000000, 89.533081054688, 267.76354980469); //
CreateObject(4652, -3967.9599609375, -1131.2314453125, 87.25422668457, 0.000000, 89.533081054688, 267.76354980469); //
CreateObject(4652, -3931.453125, -1131.9873046875, 87.25422668457, 0.000000, 89.527587890625, 267.7587890625); //
CreateObject(4652, -3922.6875, -1137.1865234375, 87.25422668457, 0.000000, 91.777587890625, 178.99377441406); //
CreateObject(4652, -3922.7026367188, -1152.3997802734, 87.25422668457, 0.000000, 91.774291992188, 178.9892578125); //
CreateObject(4652, -3922.703125, -1167.77734375, 87.25422668457, 0.000000, 91.774291992188, 178.9892578125); //
CreateObject(4652, -3922.763671875, -1182.7490234375, 87.25422668457, 0.000000, 91.774291992188, 178.9892578125); //
CreateObject(5878, -3940.0981445313, -1142.5693359375, 47.08715057373, 0.000000, 352.05993652344, 1.9849853515625); //
CreateObject(5878, -3993.2236328125, -1180.2607421875, 47.08715057373, 0.000000, 352.05139160156, 177.19299316406); //
CreateObject(3074, -4008.193359375, -1163.5146484375, 65.322601318359, 0.000000, 0.000000, 0.000000); //
CreateObject(3074, -3961.5556640625, -1131.9189453125, 64.77165222168, 0.000000, 0.000000, 269.4287109375); //
CreateObject(5184, -4053.6164550781, -1130.8781738281, 80.609001159668, 0.000000, 0.000000, 5); //
CreateObject(8613, -3971.9567871094, -1137.9896240234, 50.606216430664, 0.000000, 0.000000, 94.545013427734); //
CreateObject(5184, -4042.0134277344, -1128.3312988281, 72.862373352051, 0.000000, 0.000000, 4.998779296875); //
CreateObject(8613, -3983.6298828125, -1140.1596679688, 58.350982666016, 0.000000, 0.000000, 94.542846679688); //
CreateObject(5837, -3970.1506347656, -1191.7886962891, 48.124164581299, 0.000000, 0.000000, 0.000000); //
CreateObject(3601, -3927.388671875, -1185.595703125, 54.059028625488, 0.000000, 0.000000, 180.63171386719); //
CreateObject(3073, -4006.4208984375, -1162.4110107422, 48.778877258301, 0.000000, 0.000000, 0.000000); //
CreateObject(3599, -3925.9575195313, -1192.4158935547, 81.172843933105, 0.000000, 0.000000, 0.000000); //
CreateObject(4652, -3891.1850585938, -1195.1588134766, 75.148727416992, 0.000000, 179.62927246094, 180.97424316406); //
//
//SFPD
SFPDTop = CreateObject(975, -1627.7082519531, 688.26702880859, 7.8621897697449, 0, 0, 0);
SetTimer("SFPDTopTimer", 5000, 1);
sfpdt=CreateObject(975, -1701.4654541016, 684.09387207031, 25.537664413452, 0.000000, 0.000000, 270.67565917969); //close 3
sfpdb=CreateObject(975, -1573.0546875, 662.7529296875, 7.8621897697449, 0.000000, 0.000000, 88.055419921875); //close 4
CreateObject(2946, -1622.1328125, 688.35247802734, 5.8915119171143, 0.000000, 0.000000, 266.70568847656); //
CreateObject(2946, -1620.8858642578, 688.43548583984, 5.8915119171143, 0.000000, 0.000000, 266.7041015625); //
CreateObject(3608, -2251.1025390625, -1366.5278320313, 290.83236694336, 0.000000, 0.000000, 302.43542480469); //
CreateObject(14407, -2237.7109375, -1362.0419921875, 291.90252685547, 0.000000, 0.000000, 304.42016601563); //
CreateObject(14407, -2230.044921875, -1355.9013671875, 285.13446044922, 0.000000, 0.000000, 304.42016601563); //
CreateObject(14407, -2222.8259277344, -1350.9346923828, 279.63446044922, 0.000000, 0.000000, 304.42016601563); //
CreateObject(971, -1636.609375, 688.23803710938, 9.5999994277954, 0.000000, 0.000000, 0.000000); //
CreateObject(971, -1627.7353515625, 688.2646484375, 13.119994163513, 0.000000, 0.000000, 0.010986328125); //


return 1;
}

public OnGameModeExit()
{
	return 1;
}

public dm1down(playerid)
{
   MoveObject(dm1,-3938.7331542969, -1190.4425048828, 47.598243713379,2.00);
   return 1;
}

public sfpdtdown(playerid)
{
   MoveObject(sfpdt, -1701.4654541016, 684.09387207031, 25.537664413452,2.00);
   return 1;
}

public sfpdbdown(playerid)
{
   MoveObject(sfpdb,-1573.0546875, 662.7529296875, 7.8621897697449,2.00);
   return 1;
}

public SFPDTopTimer()
{
if(IsPlayerInRangeOfPoint(playerid, 10, -1627.7082519531, 688.26702880859, 7.8621897697449))
{
MoveObject(SFPDTop, -1636.5294189453, 688.26928710938, 7.8621897697449, 2);
}else{
MoveObject(SFPDTop, -1627.7082519531, 688.26702880859, 7.8621897697449, 2);
}
}

public OnPlayerRequestClass(playerid, classid)
{
	SetPlayerPos(playerid, 1282.4014,-831.8366,83.1406);
	SetPlayerFacingAngle(playerid, 11.1217);
	SetPlayerCameraPos(playerid, 1278.5062,-825.6070,83.3377);
	SetPlayerCameraLookAt(playerid, 1282.4014,-831.8366,83.1406);
	return 1;
}

public OnPlayerRequestSpawn(playerid)
{
	return 1;
}

public OnPlayerConnect(playerid)
{
  SendClientMessage(playerid,0xAA3333 , "Welcome to WDMClan.");
  SendClientMessage(playerid,0xAA3333 , "Freedom/DM/Stunting.  Please read /rules");
  SendClientMessage(playerid,0xAA3333 , "http://www.wdmclan.tk");
  SendClientMessage(playerid,0xAA3333 , "Use /dm to go to are dm zone.");
	SendClientMessage(playerid,0xAA3333 , "Use /stunts to find are stunting zones.");
	
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
	return 1;
}

public OnPlayerSpawn(playerid)
{
	return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
	return 1;
}

public OnVehicleSpawn(vehicleid)
{
	return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
	return 1;
}

public OnPlayerText(playerid, text[])
{
	return 1;
}


public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/help", cmdtext, true, 10) == 0)
	{
		SendClientMessage(playerid, 0xAA3333, "Help");
		SendClientMessage(playerid, 0xAA3333, "For Commands Do /commands");
		SendClientMessage(playerid, 0xAA3333, "For Rules Do /rules");
		return 1;
	}

	if (strcmp("/commands", cmdtext, true, 10) == 0)
	{
   	SendClientMessage(playerid, 0xAA3333, "Commands List");
		SendClientMessage(playerid, 0xAA3333, "/afk /back /kill /stunts");
 		SendClientMessage(playerid, 0xAA3333, "/dm /nos /admins /sfpdcmds");
	  return 1;
	}

	if (strcmp("/rules", cmdtext, true, 10) == 0)
	{
   	SendClientMessage(playerid, 0xAA3333, "Rules");
		SendClientMessage(playerid, 0xAA3333, "No DM out of dm zone.");
 		SendClientMessage(playerid, 0xAA3333, "No car robing.");
 		SendClientMessage(playerid, 0xAA3333, "All ways do as admins say.");
	  return 1;
	}

	if (strcmp("/sfpdcmds", cmdtext, true, 10) == 0)
	{
   	SendClientMessage(playerid, 0xAA3333, "SFPD Commands");
		SendClientMessage(playerid, 0xAA3333, "Open Gate Cmds");
 		SendClientMessage(playerid, 0xAA3333, "/sfpdt = top gate");
 		SendClientMessage(playerid, 0xAA3333, "/sfpdb = bottom gate");
 		SendClientMessage(playerid, 0xAA3333, "/sfpdg = garage gate");
	  return 1;
	}
	if (strcmp("/stunts", cmdtext, true, 10) == 0)
	{
  		SendClientMessage(playerid, 0xAA3333, "List Of Stunt Zones");
  		SendClientMessage(playerid, 0xAA3333, "/airportls");
  		SendClientMessage(playerid, 0xAA3333, "More To Come");
  	return 1;
	}
	if(strcmp(cmdtext, "/gay", true, 10) == 0)
	{
  	new str[218], pName[20];
  	GetPlayerName(playerid, pName, sizeof(pName));
  		format(str, sizeof(str), "%s Is Gay", pName);
  		SendClientMessageToAll(0xAA3333, str);
  		return 1;
	}

	if(strcmp(cmdtext, "/afk", true, 10) == 0)
	{
  		new str[218], pName[20];
  		GetPlayerName(playerid, pName, sizeof(pName));
  		format(str, sizeof(str), "%s Is AFk", pName);
  	SendClientMessageToAll(0xAA3333, str);
  	return 1;
	}

	if(strcmp(cmdtext, "/brb", true, 10) == 0)
	{
  	new str[218], pName[20];
  	GetPlayerName(playerid, pName, sizeof(pName));
  		format(str, sizeof(str), "%s Is BRB", pName);
  	SendClientMessageToAll(0xAA3333, str);
  	return 1;
	}

	if(strcmp(cmdtext, "/back", true, 10) == 0)
	{
  	new str[218], pName[20];
  	GetPlayerName(playerid, pName, sizeof(pName));
  		format(str, sizeof(str), "%s Is Back", pName);
  	SendClientMessageToAll(0xAA3333, str);
  	return 1;
	}
	
	if (strcmp(cmdtext, "/nos", true, 10) == 0)
	{
		IsPlayerInAnyVehicle(playerid);
		AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
		SendClientMessage(playerid, 0xAA3333, "You have nitrous in your car.w");
		return 1;
	}

	if (strcmp("/dm", cmdtext, true, 10) == 0)
	{
		SetPlayerPos(playerid, -3948.9331,-1151.7775,47.4051);
		SendClientMessage(playerid, 0xAA3333, "Ready To Shoot!");
		SendClientMessage(playerid, 0xAA3333, "To exit please use /kill and if kill you will need to do /dm again.");
		GivePlayerWeapon(playerid, 32, 99999);
		GivePlayerWeapon(playerid, 31, 99999);
		GivePlayerWeapon(playerid, 30, 99999);
		SetPlayerHealth(playerid, 100);
		SetPlayerArmour(playerid, 100);
		return 1;
	}
	if (strcmp("/dm1", cmdtext, true, 10) == 0)
  {
	MoveObject(dm1,-3939.5805664063, -1190.3128662109, 83.106391906738,2.00);
	SendClientMessage(playerid, 0xAA3333, "Please Wait");
	SetTimer("dm1down", 20000, 0);
	return 1;
	}
	if (strcmp("/sfpdt", cmdtext, true, 10) == 0)
  {
	MoveObject(sfpdt,-1701.46484375, 684.09375, 22.287664413452,2.00);
	SendClientMessage(playerid, 0xAA3333, "Opening Gate");
	SetTimer("sfpdtdown", 20000, 0);
	return 1;
	}
	if (strcmp("/sfpdb", cmdtext, true, 10) == 0)
  {
	MoveObject(sfpdb,-1573.0546875, 662.7529296875, 4.6121897697449,2.00);
	SendClientMessage(playerid, 0xAA3333, "Opening Gate");
	SetTimer("sfpdbdown", 20000, 0);
	return 1;
	}
	
	return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
	return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
	return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
	return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
	return 1;
}

public OnRconCommand(cmd[])
{
	return 1;
}

public OnObjectMoved(objectid)
{
	return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
	return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
	return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
	return 1;
}

public OnPlayerExitedMenu(playerid)
{
	return 1;
}
__________________
cssbart is offline  
Old 18/02/2010, 11:03 AM   #7
chosen
Little Clucker
 
Join Date: Jun 2008
Posts: 34
Reputation: 0
Default Re: auto gates need

Code:
#include <a_samp>
#include <KIHC>
#include <struct>

// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

//Jonny's Script

new dm1;
forward dm1down(playerid);

new SFPDTop;
forward SFPDTopTimer(playerid);

new sfpdt;
forward sfpdtdown(playerid);

new sfpdb;
forward sfpdbdown(playerid);


public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print("  Freedom/DM/Stunting By Jonny");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}


main()
{
	print("\n----------------------------------");
	print("  Freedom/DM/Stunting By Jonny");
	print("----------------------------------\n");
}


public OnGameModeInit()
{
	// Don't use these lines if it's a filterscript
	SetGameModeText("Freedom/DM/Stunting");
	AddPlayerClass(0,-1753.9595,959.2625,24.8828,180.2193,0,0,0,0,0,0); // player spawn cj
	AddPlayerClass(293,-1753.9595,959.2625,24.8828,180.2193,0,0,0,0,0,0); // Og Loc
	AddPlayerClass(107,-1753.9595,959.2625,24.8828,180.2193,0,0,0,0,0,0); // player spawn Grove Street member
	AddPlayerClass(105,-1753.9595,959.2625,24.8828,180.2193,0,0,0,0,0,0); // player spawn Grove Street member
	AddPlayerClass(106,-1753.9595,959.2625,24.8828,180.2193,0,0,0,0,0,0); // player spawn Grove Street member
	AddPlayerClass(28,-1753.9595,959.2625,24.8828,180.2193,0,0,0,0,0,0); // dont know who he is
	//cars
	AddStaticVehicle(541,-1786.3391,1205.5280,24.7500,178.9352,22,1);
	AddStaticVehicle(436,-2526.2947,1229.4812,37.3960,213.0593,12,12);
	AddStaticVehicle(421,-1758.9066,911.5603,24.6942,88.5318,13,1);
	AddStaticVehicle(411,-2354.5764,1250.2322,28.4569,90.5214,116,1);
	AddStaticVehicle(506,-2722.6880,980.4581,54.1654,2.3510,6,6);
	AddStaticVehicle(567,-1687.3698,1003.5350,17.4535,89.1999,88,64);
	AddStaticVehicle(578,-1787.0021,1216.8849,33.2841,268.0793,1,1);
	AddStaticVehicle(468,-2390.1882,1216.6508,34.3218,275.3025,46,46);
	AddStaticVehicle(581,-2645.7717,1370.3085,6.7637,270.7869,66,1);
	AddStaticVehicle(477,-2644.6333,1332.5770,6.9400,268.8670,94,1);
 	AddStaticVehicle(545,-1753.7076,948.0575,24.5991,91.6215,47,1);
	AddStaticVehicle(451,-1721.4655,980.2755,30.4583,2.8676,61,61);
	AddStaticVehicle(521,-2133.1162,196.6453,51.1831,269.6657,75,13);
	AddStaticVehicle(522,-1730.9972,960.7554,25.0718,269.3759,8,82);
	AddStaticVehicle(522,-1776.6486,960.8593,25.0737,90.1190,8,82);
	AddStaticVehicle(434,-2495.3091,1216.3907,37.3868,322.3733,12,12);
	AddStaticVehicle(525,-2479.9646,416.1866,27.3560,138.9263,8,82);
	AddStaticVehicle(525,-2490.1135,424.5793,27.3437,137.3763,8,82);
	AddStaticVehicle(416,-2705.6863,591.5366,14.0238,92.1485,7,1);
	AddStaticVehicle(416,-2707.1382,611.7045,14.0236,87.1527,7,1);
	AddStaticVehicle(420,-2588.6592,622.3329,14.0236,86.8374,6,6);
	AddStaticVehicle(420,-2588.9475,637.5594,14.0167,87.3606,6,6);
	AddStaticVehicle(480,-2572.6128,632.9766,14.0299,268.3483,45,21);
	AddStaticVehicle(500,-2544.7664,604.9912,14.0298,90.9741,96,15);
	AddStaticVehicle(431,-2041.6261,482.7328,34.7397,0.9856,108,1);
	AddStaticVehicle(555,-2408.2747,970.5540,45.1103,179.8658,47,1);
	AddStaticVehicle(513,-1361.5284,-490.1158,13.7149,206.9124,39,106);
	AddStaticVehicle(512,-1439.4449,-533.7003,13.7426,212.5382,39,106);
	AddStaticVehicle(597,-1573.6500,742.6940,-5.4745,90.4325,7,1);
	AddStaticVehicle(597,-1573.8478,714.1404,-5.5358,88.7192,7,1);
	AddStaticVehicle(599,-1611.9218,672.9374,6.8933,179.1680,7,1);
	AddStaticVehicle(599,-1594.1355,673.0961,6.8946,178.0049,7,1);
	AddStaticVehicle(407,-2021.2616,92.8698,27.7104,274.4587,3,1);
	AddStaticVehicle(407,-2020.3599,76.2341,27.6858,276.4792,3,1);
	AddStaticVehicle(490,-1600.0076,692.4629,-5.4725,179.0916,0,0);
	AddStaticVehicle(523,-1589.3365,711.3475,-5.6739,272.8195,7,1);
	AddStaticVehicle(523,-1589.8573,706.1879,-5.6645,268.4362,7,1);
//
//DM ZONE
	dm1=CreateObject(3109,-3938.7331542969,-1190.4425048828,47.598243713379,0.000000,85.840026855469,89.529968261719); //
	CreateObject(4652, -3966.5456542969, -1140.9321289063, 46.328544616699, 0.000000, 0.000000, 0.000000); //
	CreateObject(4652, -3966.5625, -1155.7919921875, 46.328544616699, 0.000000, 0.000000, 0.000000); //
	CreateObject(4652, -3966.5029296875, -1170.470703125, 46.328544616699, 0.000000, 0.000000, 0.000000); //
	CreateObject(4652, -3966.65625, -1185.0390625, 46.328544616699, 0.000000, 0.000000, 0.000000); //
	CreateObject(4652, -3927.9206542969, -1192.1214599609, 87.25422668457, 0.000000, 91.045043945313, 90.530029296875); //
	CreateObject(4652, -3945.83984375, -1192.2421875, 87.25422668457, 0.000000, 91.043701171875, 90.52734375); //
	CreateObject(4652, -3964.3518066406, -1192.7954101563, 87.25422668457, 0.000000, 91.045043945313, 90.530029296875); //
	CreateObject(4652, -3982.3891601563, -1192.9606933594, 87.25422668457, 0.000000, 91.293701171875, 89.52734375); //
	CreateObject(4652, -4000.0793457031, -1193.0181884766, 87.25422668457, 0.000000, 91.290893554688, 89.522094726563); //
	CreateObject(4652, -4008.3525390625, -1185.6494140625, 87.25422668457, 0.000000, 91.285400390625, 359.01672363281); //
	CreateObject(4652, -4008.26171875, -1170.453125, 87.25422668457, 0.000000, 91.279907226563, 359.01123046875); //
	CreateObject(4652, -4008.419921875, -1155.8212890625, 87.25422668457, 0.000000, 91.279907226563, 359.01123046875); //
	CreateObject(4652, -4008.3869628906, -1140.5666503906, 87.25422668457, 0.000000, 91.285400390625, 359.01672363281); //
	CreateObject(4652, -4002.130859375, -1130.86328125, 87.25422668457, 0.000000, 89.533081054688, 270.76354980469); //
	CreateObject(4652, -3983.4130859375, -1130.8544921875, 87.25422668457, 0.000000, 89.527587890625, 267.7587890625); //
	CreateObject(4652, -3950.2607421875, -1131.55859375, 87.25422668457, 0.000000, 89.533081054688, 267.76354980469); //
	CreateObject(4652, -3967.9599609375, -1131.2314453125, 87.25422668457, 0.000000, 89.533081054688, 267.76354980469); //
	CreateObject(4652, -3931.453125, -1131.9873046875, 87.25422668457, 0.000000, 89.527587890625, 267.7587890625); //
	CreateObject(4652, -3922.6875, -1137.1865234375, 87.25422668457, 0.000000, 91.777587890625, 178.99377441406); //
	CreateObject(4652, -3922.7026367188, -1152.3997802734, 87.25422668457, 0.000000, 91.774291992188, 178.9892578125); //
	CreateObject(4652, -3922.703125, -1167.77734375, 87.25422668457, 0.000000, 91.774291992188, 178.9892578125); //
	CreateObject(4652, -3922.763671875, -1182.7490234375, 87.25422668457, 0.000000, 91.774291992188, 178.9892578125); //
	CreateObject(5878, -3940.0981445313, -1142.5693359375, 47.08715057373, 0.000000, 352.05993652344, 1.9849853515625); //
	CreateObject(5878, -3993.2236328125, -1180.2607421875, 47.08715057373, 0.000000, 352.05139160156, 177.19299316406); //
	CreateObject(3074, -4008.193359375, -1163.5146484375, 65.322601318359, 0.000000, 0.000000, 0.000000); //
	CreateObject(3074, -3961.5556640625, -1131.9189453125, 64.77165222168, 0.000000, 0.000000, 269.4287109375); //
	CreateObject(5184, -4053.6164550781, -1130.8781738281, 80.609001159668, 0.000000, 0.000000, 5); //
	CreateObject(8613, -3971.9567871094, -1137.9896240234, 50.606216430664, 0.000000, 0.000000, 94.545013427734); //
	CreateObject(5184, -4042.0134277344, -1128.3312988281, 72.862373352051, 0.000000, 0.000000, 4.998779296875); //
	CreateObject(8613, -3983.6298828125, -1140.1596679688, 58.350982666016, 0.000000, 0.000000, 94.542846679688); //
	CreateObject(5837, -3970.1506347656, -1191.7886962891, 48.124164581299, 0.000000, 0.000000, 0.000000); //
	CreateObject(3601, -3927.388671875, -1185.595703125, 54.059028625488, 0.000000, 0.000000, 180.63171386719); //
	CreateObject(3073, -4006.4208984375, -1162.4110107422, 48.778877258301, 0.000000, 0.000000, 0.000000); //
	CreateObject(3599, -3925.9575195313, -1192.4158935547, 81.172843933105, 0.000000, 0.000000, 0.000000); //
	CreateObject(4652, -3891.1850585938, -1195.1588134766, 75.148727416992, 0.000000, 179.62927246094, 180.97424316406); //
	//
	//SFPD
	SFPDTop = CreateObject(975, -1627.7082519531, 688.26702880859, 7.8621897697449, 0, 0, 0);
	SetTimer("SFPDTopTimer", 5000, 1);
	sfpdt=CreateObject(975, -1701.4654541016, 684.09387207031, 25.537664413452, 0.000000, 0.000000, 270.67565917969); //close 3
	sfpdb=CreateObject(975, -1573.0546875, 662.7529296875, 7.8621897697449, 0.000000, 0.000000, 88.055419921875); //close 4
	CreateObject(2946, -1622.1328125, 688.35247802734, 5.8915119171143, 0.000000, 0.000000, 266.70568847656); //
	CreateObject(2946, -1620.8858642578, 688.43548583984, 5.8915119171143, 0.000000, 0.000000, 266.7041015625); //
	CreateObject(3608, -2251.1025390625, -1366.5278320313, 290.83236694336, 0.000000, 0.000000, 302.43542480469); //
	CreateObject(14407, -2237.7109375, -1362.0419921875, 291.90252685547, 0.000000, 0.000000, 304.42016601563); //
	CreateObject(14407, -2230.044921875, -1355.9013671875, 285.13446044922, 0.000000, 0.000000, 304.42016601563); //
	CreateObject(14407, -2222.8259277344, -1350.9346923828, 279.63446044922, 0.000000, 0.000000, 304.42016601563); //
	CreateObject(971, -1636.609375, 688.23803710938, 9.5999994277954, 0.000000, 0.000000, 0.000000); //
	CreateObject(971, -1627.7353515625, 688.2646484375, 13.119994163513, 0.000000, 0.000000, 0.010986328125); //

return 1;
}

public OnGameModeExit()
{
	return 1;
}

public dm1down(playerid)
{
   MoveObject(dm1,-3938.7331542969, -1190.4425048828, 47.598243713379,2.00);
   return 1;
}

public sfpdtdown(playerid)
{
   MoveObject(sfpdt, -1701.4654541016, 684.09387207031, 25.537664413452,2.00);
   return 1;
}

public sfpdbdown(playerid)
{
   MoveObject(sfpdb,-1573.0546875, 662.7529296875, 7.8621897697449,2.00);
   return 1;
}

public SFPDTopTimer(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 10, -1627.7082519531, 688.26702880859, 7.8621897697449))
{
MoveObject(SFPDTop, -1636.5294189453, 688.26928710938, 7.8621897697449, 2);
}else{
MoveObject(SFPDTop, -1627.7082519531, 688.26702880859, 7.8621897697449, 2);
}
}

public OnPlayerRequestClass(playerid, classid)
{
	SetPlayerPos(playerid, 1282.4014,-831.8366,83.1406);
	SetPlayerFacingAngle(playerid, 11.1217);
	SetPlayerCameraPos(playerid, 1278.5062,-825.6070,83.3377);
	SetPlayerCameraLookAt(playerid, 1282.4014,-831.8366,83.1406);
	return 1;
}

public OnPlayerRequestSpawn(playerid)
{
	return 1;
}

public OnPlayerConnect(playerid)
{
  SendClientMessage(playerid,0xAA3333 , "Welcome to WDMClan.");
  SendClientMessage(playerid,0xAA3333 , "Freedom/DM/Stunting.  Please read /rules");
  SendClientMessage(playerid,0xAA3333 , "http://www.wdmclan.tk");
  SendClientMessage(playerid,0xAA3333 , "Use /dm to go to are dm zone.");
	SendClientMessage(playerid,0xAA3333 , "Use /stunts to find are stunting zones.");

	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
	return 1;
}

public OnPlayerSpawn(playerid)
{
	return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
	return 1;
}

public OnVehicleSpawn(vehicleid)
{
	return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
	return 1;
}

public OnPlayerText(playerid, text[])
{
	return 1;
}


public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/help", cmdtext, true, 10) == 0)
	{
		SendClientMessage(playerid, 0xAA3333, "Help");
		SendClientMessage(playerid, 0xAA3333, "For Commands Do /commands");
		SendClientMessage(playerid, 0xAA3333, "For Rules Do /rules");
		return 1;
	}

	if (strcmp("/commands", cmdtext, true, 10) == 0)
	{
   	SendClientMessage(playerid, 0xAA3333, "Commands List");
		SendClientMessage(playerid, 0xAA3333, "/afk /back /kill /stunts");
 		SendClientMessage(playerid, 0xAA3333, "/dm /nos /admins /sfpdcmds");
	  return 1;
	}

	if (strcmp("/rules", cmdtext, true, 10) == 0)
	{
   	SendClientMessage(playerid, 0xAA3333, "Rules");
		SendClientMessage(playerid, 0xAA3333, "No DM out of dm zone.");
 		SendClientMessage(playerid, 0xAA3333, "No car robing.");
 		SendClientMessage(playerid, 0xAA3333, "All ways do as admins say.");
	  return 1;
	}

	if (strcmp("/sfpdcmds", cmdtext, true, 10) == 0)
	{
   	SendClientMessage(playerid, 0xAA3333, "SFPD Commands");
		SendClientMessage(playerid, 0xAA3333, "Open Gate Cmds");
 		SendClientMessage(playerid, 0xAA3333, "/sfpdt = top gate");
 		SendClientMessage(playerid, 0xAA3333, "/sfpdb = bottom gate");
 		SendClientMessage(playerid, 0xAA3333, "/sfpdg = garage gate");
	  return 1;
	}
	if (strcmp("/stunts", cmdtext, true, 10) == 0)
	{
  		SendClientMessage(playerid, 0xAA3333, "List Of Stunt Zones");
  		SendClientMessage(playerid, 0xAA3333, "/airportls");
  		SendClientMessage(playerid, 0xAA3333, "More To Come");
  	return 1;
	}
	if(strcmp(cmdtext, "/gay", true, 10) == 0)
	{
  	new str[218], pName[20];
  	GetPlayerName(playerid, pName, sizeof(pName));
  		format(str, sizeof(str), "%s Is Gay", pName);
  		SendClientMessageToAll(0xAA3333, str);
  		return 1;
	}

	if(strcmp(cmdtext, "/afk", true, 10) == 0)
	{
  		new str[218], pName[20];
  		GetPlayerName(playerid, pName, sizeof(pName));
  		format(str, sizeof(str), "%s Is AFk", pName);
  	SendClientMessageToAll(0xAA3333, str);
  	return 1;
	}

	if(strcmp(cmdtext, "/brb", true, 10) == 0)
	{
  	new str[218], pName[20];
  	GetPlayerName(playerid, pName, sizeof(pName));
  		format(str, sizeof(str), "%s Is BRB", pName);
  	SendClientMessageToAll(0xAA3333, str);
  	return 1;
	}

	if(strcmp(cmdtext, "/back", true, 10) == 0)
	{
  	new str[218], pName[20];
  	GetPlayerName(playerid, pName, sizeof(pName));
  		format(str, sizeof(str), "%s Is Back", pName);
  	SendClientMessageToAll(0xAA3333, str);
  	return 1;
	}

	if (strcmp(cmdtext, "/nos", true, 10) == 0)
	{
		IsPlayerInAnyVehicle(playerid);
		AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
		SendClientMessage(playerid, 0xAA3333, "You have nitrous in your car.w");
		return 1;
	}

	if (strcmp("/dm", cmdtext, true, 10) == 0)
	{
		SetPlayerPos(playerid, -3948.9331,-1151.7775,47.4051);
		SendClientMessage(playerid, 0xAA3333, "Ready To Shoot!");
		SendClientMessage(playerid, 0xAA3333, "To exit please use /kill and if kill you will need to do /dm again.");
		GivePlayerWeapon(playerid, 32, 99999);
		GivePlayerWeapon(playerid, 31, 99999);
		GivePlayerWeapon(playerid, 30, 99999);
		SetPlayerHealth(playerid, 100);
		SetPlayerArmour(playerid, 100);
		return 1;
	}
	if (strcmp("/dm1", cmdtext, true, 10) == 0)
  {
	MoveObject(dm1,-3939.5805664063, -1190.3128662109, 83.106391906738,2.00);
	SendClientMessage(playerid, 0xAA3333, "Please Wait");
	SetTimer("dm1down", 20000, 0);
	return 1;
	}
	if (strcmp("/sfpdt", cmdtext, true, 10) == 0)
  {
	MoveObject(sfpdt,-1701.46484375, 684.09375, 22.287664413452,2.00);
	SendClientMessage(playerid, 0xAA3333, "Opening Gate");
	SetTimer("sfpdtdown", 20000, 0);
	return 1;
	}
	if (strcmp("/sfpdb", cmdtext, true, 10) == 0)
  {
	MoveObject(sfpdb,-1573.0546875, 662.7529296875, 4.6121897697449,2.00);
	SendClientMessage(playerid, 0xAA3333, "Opening Gate");
	SetTimer("sfpdbdown", 20000, 0);
	return 1;
	}

	return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
	return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
	return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
	return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
	return 1;
}

public OnRconCommand(cmd[])
{
	return 1;
}

public OnObjectMoved(objectid)
{
	return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
	return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
	return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
	return 1;
}

public OnPlayerExitedMenu(playerid)
{
	return 1;
}
Here, try this. I don't have that include to test it. Just arange it in Pawno.
chosen is offline  
Old 18/02/2010, 12:05 PM   #8
cssbart
Huge Clucker
 
Join Date: Nov 2009
Location: United Kingdom, Kenilworth
Posts: 210
Reputation: 0
Default Re: auto gates need

Thanks by the way who maded the gate app
__________________
cssbart is offline  
Old 18/02/2010, 01:45 PM   #9
aircombat
High-roller
 
Join Date: Feb 2010
Posts: 1,535
Reputation: 9
Default Re: auto gates need

don't remember sorry
________
LovelyWendie99

Last edited by aircombat; 08/04/2011 at 09:38 AM.
aircombat is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Include] [INC] t-Auto Gates Toad Includes 131 13/04/2014 09:01 AM
LVPD Gates v2 Now with Auto Gates!! SlashPT Filterscripts 37 16/03/2010 03:59 PM
Auto gates ;) GaGlets(R) Help Archive 7 25/11/2009 04:01 PM
Auto Gates Danikov Help Archive 26 20/10/2009 03:31 PM
[HELP] t-Auto Gates joeri55 Help Archive 2 02/06/2009 08:50 AM


All times are GMT. The time now is 12:59 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.