maar als ik de gate omhoog laat gaan, verdwijnt hij gewoon :S
hierbij de code, misschien dat jullie me kunnen helpen?
ik ben er nog mee aan het experimenteren, dit is op mijn test-server niet de orginele.
#include <a_samp>
#include <IsPlayerLAdmin>
new admingateL;
new admingateR;
new admingateroofL;
new admingateroofR;
forward GateAdminLClose();
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#define GREEN 0x21DD00FF
#define YELLOW 0xFFFF00FF
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
#endif
public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
SetGameModeText("Jiggy's Server");
// airfield dessert
AddStaticVehicle(513,325.6485,2543.0371,16.5346,179.3416,0,7); // stuntplane1
AddStaticVehicle(513,290.0703,2541.1614,16.5473,182.3566,0,7); // stuntplane2
AddStaticVehicle(548,386.6759,2543.4565,16.2662,178.6880,0,7); // cargobob
AddStaticVehicle(425,376.3818,2542.0134,16.2661,180.0234,0,7); // hunter
AddStaticVehicle(417,366.3322,2542.6875,16.3001,179.4228,0,7); // Leviathn
AddStaticVehicle(487,356.3765,2542.9106,16.4125,178.3696,0,7); // Maverick
AddStaticVehicle(548,346.4505,2542.4873,16.4842,177.9937,0,7); // cargobob
AddStaticVehicle(519,405.0844,2456.5757,16.2070,2.0531,0,7); // large plain
AddStaticVehicle(520,405.0844,2456.5757,16.2070,2.0531,0,7); // hydra dessert
// desert town near airfield dessert
AddStaticVehicle(507,-222.6291,2595.5381,62.5276,359.4182,0,7); // elegant
AddStaticVehicle(576,-235.0299,2594.9387,62.3117,358.2195,0,7); // Tornado
AddStaticVehicle(402,-241.0515,2594.4502,62.5349,358.5888,0,7); // Buffalo
AddStaticVehicle(415,-240.3969,2609.4670,62.4758,180.7983,0,7); // Cheetah
AddStaticVehicle(437,-208.8155,2610.7480,62.8364,89.8347,0,7); // Coach
// police station LS
AddStaticVehicle(523,1579.9397,-1636.6987,13.1194,85.2935,0,0); // police bike 1
AddStaticVehicle(523,1552.1610,-1615.8724,12.9497,172.2778,0,0); // police bike 2
AddStaticVehicle(523,1555.4745,-1616.0212,12.9522,179.4972,0,0); // police bike 3
AddStaticVehicle(523,1558.5488,-1615.9955,12.9545,181.2689,0,0); // police bike 4
AddStaticVehicle(497,1573.9067,-1647.3130,28.5784,180.7296,0,1); // policeheli1
AddStaticVehicle(497,1556.7268,-1645.1234,28.5695,182.1113,0,1); // policeheli2
AddStaticVehicle(597,1568.1931,-1616.0383,13.1495,267.7675,0,1); // police car 1
AddStaticVehicle(597,1576.9700,-1616.2606,13.1504,269.1230,0,1); // police car 2
AddStaticVehicle(597,1575.8885,-1624.0433,13.1527,89.2398,0,1); // police car 3
AddStaticVehicle(597,1567.5747,-1624.1367,13.1523,89.1097,0,1); // police car 4
AddStaticVehicle(597,1558.4757,-1623.9781,13.1517,89.4066,0,1); // police car 5
AddStaticVehicle(427,1587.2762,-1710.5032,6.0223,0.3863,0,1); // police van 1
AddStaticVehicle(427,1578.4663,-1710.5134,6.0225,359.7452,0,1); // police van 2
AddStaticVehicle(427,1595.2961,-1710.7346,6.0250,359.3968,0,1); // police van 3
AddStaticVehicle(599,1602.3025,-1700.0538,6.0751,89.5286,0,1); // police jeep
AddStaticVehicle(599,1601.4164,-1692.0079,6.0772,92.1313,0,1); // police jeep 2
AddStaticVehicle(599,1600.7095,-1683.9303,6.0749,88.8979,0,1); // police jeep 3
AddStaticVehicle(597,1570.1780,-1710.2130,5.6596,0.9061,0,1); // police car 6
AddStaticVehicle(597,1558.7864,-1708.9792,5.6605,357.9036,0,1); // police car 7
AddStaticVehicle(597,1529.3655,-1688.1055,5.6604,268.8957,0,1); // police car 8
AddStaticVehicle(597,1544.1821,-1684.2366,5.6601,88.2322,0,1); // police car 9
AddStaticVehicle(597,1585.0870,-1671.5612,5.6620,269.5355,0,1); // police car 10
// airportLS
AddStaticVehicle(485,2006.3395,-2355.6982,13.2018,90.8318,1,76); // airport car
AddStaticVehicle(513,2113.5605,-2414.2927,14.0907,181.0206,2,0); // LS stunt plane 1
AddStaticVehicle(511,1922.2836,-2243.4868,14.9195,180.7854,2,2); // LS two seater 1
AddStaticVehicle(512,1975.4506,-2366.0190,13.8291,178.3202,0,1); // LS stuntplane2 1
AddStaticVehicle(476,1893.7738,-2418.3833,14.2440,182.4864,2,1); // ruslter 4
//vinewood
AddStaticVehicle(405,1429.0438,-882.2520,50.6120,51.5318,40,1); // car 2
AddStaticVehicle(488,1432.7267,-889.4485,54.5719,358.1986,2,2); // helicopter 2
AddStaticVehicle(481,1426.1201,-885.7447,50.2257,268.8442,12,9); // BMX
AddStaticVehicle(479,1518.7498,-872.1954,62.3371,225.1701,49,23); // car 3
// admin GARAGE SF!
admingateL = CreateObject(980,-1820.208007,1292.614746,17.827030,0.000000,0.000000,181.953155); //gate bottom garage Left
admingateR = CreateObject(980,-1808.725463,1294.781860,17.680759,0.000000,0.000000,197.933258); //gate bottom garage Right
admingateroofL = CreateObject(980,-1853.651611,1292.346435,52.212341,1.000000,0.000000,106.874000); //gate roof garage Left
admingateroofR = CreateObject(980,-1775.903198,1303.933593,52.262916,0.000000,0.000000,268.131958); //gate roof garage Right
return 1;
}
//---------------------------------------------------------
SetupPlayerForClassSelection(playerid)
{
SetPlayerPos(playerid,-1389.554,2641.089,59.79216); // Waar de speler te zetten voor het spawn-menu
SetPlayerCameraPos(playerid,-1389.554,2631.089,62.79216); // Camera voor het spawn-menu
SetPlayerCameraLookAt(playerid,-1389.554,2641.089,59.79216); // Waar moet de camera naar toe kijken?
SetPlayerFacingAngle(playerid, 180.0); // Draai de speler naar 180.0 graden
}
//---------------------------------------------------------
public OnPlayerRequestClass(playerid, classid)
{
SetupPlayerForClassSelection(playerid);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/soccerhelp", cmdtext, true) == 0)
{
SendClientMessage(playerid, YELLOW, "How to play soccer?");
SendClientMessage(playerid, GREEN, "When u are near the ball, press the Punch/Fire button to shoot the ball");
return 1;
}
if (strcmp("/basketballhelp", cmdtext, true) == 0)
{
SendClientMessage(playerid, YELLOW, "How to play basketball?");
SendClientMessage(playerid, GREEN, "To pickup the ball if it's on the ground, press the Vehicle entering/exiting key");
SendClientMessage(playerid, GREEN, "To move around with the ball, simply use your normal moving keys");
SendClientMessage(playerid, GREEN, "To shoot the ball, press your Fire/Punch key - You must be at a basket's half field.");
SendClientMessage(playerid, GREEN, "To steal the ball from the player, you have to be infront of the player and press the Vehicle entering/exiting key.");
SendClientMessage(playerid, GREEN, "To put the ball on the ground, press the Vehicle entering/exiting key");
SendClientMessage(playerid, GREEN, "To dunk the ball get near the basket and press your Fire/Punch key");
return 1;
}
if (strcmp("/baseballhelp", cmdtext, true) == 0)
{
SendClientMessage(playerid, YELLOW, "How to play baseball?");
SendClientMessage(playerid, GREEN, "To pitch a ball, you must be at the pitching area and press the Fire/Punch key");
SendClientMessage(playerid, GREEN, "To swing with the bat, you must be inside the play field and press the Fire/Punch key");
return 1;
}
if (strcmp("/dodgeballhelp", cmdtext, true) == 0)
{
SendClientMessage(playerid, YELLOW, "How to play dodgeball?");
SendClientMessage(playerid, GREEN, "Aim with your normal moving keys");
SendClientMessage(playerid, GREEN, "To throw a ball, press your Fire/Punch key");
return 1;
}
if (strcmp("/footballhelp", cmdtext, true) ==0)
{
SendClientMessage(playerid, YELLOW, "How to play football?");
SendClientMessage(playerid, GREEN, "To pickup the ball if it's on the ground, press the Vehicle entering/exiting key");
SendClientMessage(playerid, GREEN, "To throw the ball, press your Fire/Punch key");
return 1;
}
if(strcmp("/dairport", cmdtext, true, 10)==0)
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,410.6928,2533.4175,19.1484);
return 1;
}
if(strcmp("/dtown", cmdtext, true, 10)==0)
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,-264.9789,2583.7341,63.5703);
return 1;
}
if(strcmp("/rules", cmdtext, true, 10)==0)
{
SendClientMessage(playerid, 0x00FF00FF, "*** The rules of this server ***");
SendClientMessage(playerid, 0x0000FFFF, "1. No cheating/hacking");
SendClientMessage(playerid, 0x0000FFFF, "2. Always respect a Admin");
SendClientMessage(playerid, 0x0000FFFF, "3. Don't kill the same person every time");
SendClientMessage(playerid, 0x0000FFFF, "4. No spam or advertisement!");
SendClientMessage(playerid, 0x0000FFFF, "5. Do not beg for being a admin");
SendClientMessage(playerid, 0x0000FFFF, "6. No flaming to other people");
SendClientMessage(playerid, 0x0000FFFF, "7. No heli/hydra/driveby-kills.");
SendClientMessage(playerid, 0x0000FFFF, "8. And the important rule: Have FUN! =D ");
return 1;
}
if(!strcmp(cmdtext, "/opengateleft", true))
{
if (IsPlayerLAdmin(playerid)) { // Voeg deze regel toe als alleen admins de Deur mogen openen
MoveObject( admingateL, -1820.208007,1292.614746,20.066714, 5);
SetTimer("GateClose", 3000, 0);
SendClientMessage(playerid, YELLOW,"The Left Gate Is opened and WILL CLOSE IN 3 SEC =>HURRY<=");
return 1;
}
}
if (strcmp("/opengateR", cmdtext, true, 10) == 0)
{
if (IsPlayerLAdmin(playerid)) { // Admin only?
MoveObject( admingateR, -1808.725463,1294.781860,11.920443, 5);
return 1;
}
}
if (strcmp("/closegateR", cmdtext, true, 10) == 0)
{
if (IsPlayerLAdmin(playerid)) { // Admin only?
MoveObject( admingateR, -1808.725463,1294.781860,17.680759, 5);
return 1;
}
}
if (strcmp("/openroofL", cmdtext, true, 10) == 0)
{
if (IsPlayerLAdmin(playerid)) { // Voeg deze regel toe als alleen admins de Deur mogen openen
MoveObject( admingateroofL, -1853.651611,1292.346435,47.212341, 5);
return 1;
}
}
if (strcmp("/closeroofL", cmdtext, true, 10) == 0)
{
if (IsPlayerLAdmin(playerid)) { // Voeg deze regel toe als alleen admins de Deur mogen openen
MoveObject( admingateroofL, -1853.651611,1292.346435,52.212341, 5);
return 1;
}
}
if (strcmp("/openroofR", cmdtext, true, 10) == 0)
{
if (IsPlayerLAdmin(playerid)) { // Admin only?
MoveObject( admingateroofR, -1775.903198,1303.933593,47.262916, 5);
return 1;
}
}
if (strcmp("/closeroofR", cmdtext, true, 10) == 0)
{
if (IsPlayerLAdmin(playerid)) { // Admin only?
MoveObject( admingateroofR, -1775.903198,1303.933593,52.262916, 5);
return 1;
}
}
return 0;
}
public GateAdminLClose()
{
MoveObject(admingateL,-1820.208007,1292.614746,17.827030, 2.5);
return 1;
}
hoi, ik ben bezig om een gate te maken.
maar als ik de gate omhoog laat gaan, verdwijnt hij gewoon :S
hierbij de code, misschien dat jullie me kunnen helpen?
ik ben er nog mee aan het experimenteren, dit is op mijn test-server niet de orginele.