Hallo ich habe aus Langeweile eine Fahrschule vor dem Krankenhaus LS Gemappt,
Video/Screen/Vorschau: http://www.youtube.com/watch?v=HuoN9TJ-tkU&feature=youtu.be
Pastebin: http://pastebin.com/getPw592
//Der Momentanige Pastebin ist ohne Tore also zum öffnen, unten ist alles mit Toren!
Falls ihr die gleichen farben wie ich wollt definirt das:
//Farben
#define Blau 0x0037FFFF
#define Rot 0xCD0000FF
#define Weiß 0xFFFFFFF6
Erklärung/Tutorial:
Zuerst definen wir die Tore so:
#define Fahrschultor;
#define Fahrschultor2;
Dannach gehen wir zu public OnGameModeInit() und schreiben:
//ADDSTATICPICKUP
AddStaticPickup(1239, 0, 1285.9225,-1308.2423,13.5437); //Fahrschuleunten
AddStaticPickup(1239, 0, 1319.2855,-1298.2687,35.6586); //Fahrschuleoben
//Create3dtextlabel's
Create3DTextLabel("/flift \n um den Fahrschulaufzug zu benutzen!",Rot, 1285.9225,-1308.2423,13.5437,8.0,0);
Create3DTextLabel("/flift \n um den Fahrschulaufzug zu benutzen!",Rot, 1319.2855,-1298.2687,35.6586,8.0,0);
nun bleibt ihr bei OnGameModeInit und schreibt noch rein:
//Fahrschule
CreateObject(3749, 1270, -1338, 18.200000762939, 0, 0, 269.25);
CreateObject(987, 1269.8000488281, -1317, 12.300000190735, 0, 0, 269.75);
CreateObject(987, 1269.8000488281, -1305, 12.300000190735, 0, 0, 269.74731445313);
CreateObject(987, 1269.8000488281, -1293, 12.300000190735, 0, 0, 269.74731445313);
CreateObject(987, 1269.8000488281, -1290.8000488281, 12.300000190735, 0, 0, 269.74731445313);
CreateObject(987, 1281.6999511719, -1291.0999755859, 12.300000190735, 0, 0, 178.74731445313);
CreateObject(987, 1293.5999755859, -1291.4000244141, 12.300000190735, 0, 0, 178.74206542969);
CreateObject(987, 1269.9000244141, -1347.4000244141, 12.300000190735, 0, 0, 269.74731445313);
CreateObject(987, 1269.8000488281, -1359.3000488281, 12.300000190735, 0, 0, 269.74731445313);
CreateObject(987, 1269.8000488281, -1371.3000488281, 12.300000190735, 0, 0, 269.74731445313);
CreateObject(987, 1269.8000488281, -1373.5, 12.300000190735, 0, 0, 269.74731445313);
CreateObject(987, 1269.6999511719, -1385.4000244141, 12.300000190735, 0, 0, 0.747314453125);
CreateObject(987, 1275.4000244141, -1385.4000244141, 12.300000190735, 0, 0, 0.7470703125);
CreateObject(987, 1287.3000488281, -1385.3000488281, 12.300000190735, 0, 0, 90.4970703125);
CreateObject(987, 1287.1999511719, -1373.4000244141, 12.300000190735, 0, 0, 85.494384765625);
Fahrschultor = CreateObject(980, 1269.6999511719, -1338, 15.10000038147, 0, 0, 89); // Befehl: /fstor
CreateObject(3928, 1293.4000244141, -1297.5, 34.700000762939, 0, 0, 0);
CreateObject(3928, 1302.0999755859, -1310.5999755859, 34.700000762939, 0, 0, 0);
CreateObject(1215, 1289.4000244141, -1294.0999755859, 35.200000762939, 0, 0, 0);
CreateObject(1215, 1297.3000488281, -1294.0999755859, 35.200000762939, 0, 0, 0);
CreateObject(1215, 1297.1999511719, -1301.0999755859, 35.200000762939, 0, 0, 0);
CreateObject(1215, 1289.4000244141, -1301, 35.200000762939, 0, 0, 0);
CreateObject(1215, 1305.9000244141, -1307.1999511719, 35.200000762939, 0, 0, 0);
CreateObject(1215, 1305.9000244141, -1314.0999755859, 35.200000762939, 0, 0, 0);
CreateObject(1215, 1298.0999755859, -1314.1999511719, 35.200000762939, 0, 0, 358);
CreateObject(1215, 1298.0999755859, -1307.3000488281, 35.200000762939, 0, 0, 0);
CreateObject(1418, 1275.6999511719, -1292.9000244141, 13.10000038147, 0, 0, 269.75);
CreateObject(1418, 1275.6999511719, -1292.9000244141, 14.5, 0, 0, 269.74731445313);
CreateObject(1418, 1275.6999511719, -1292.9000244141, 15.89999961853, 0, 0, 269.74731445313);
CreateObject(1418, 1275.6999511719, -1294.6999511719, 13.10000038147, 0, 0, 269.74731445313);
CreateObject(1418, 1275.6999511719, -1294.6999511719, 14.5, 0, 0, 269.74731445313);
CreateObject(1418, 1275.6999511719, -1294.6999511719, 15.800000190735, 0, 0, 269.74731445313);
CreateObject(1418, 1276.4000244141, -1292.9000244141, 16.60000038147, 270.25024414063, 0, 269.74731445313);
CreateObject(1418, 1276.4000244141, -1294.6999511719, 16.60000038147, 270.2470703125, 0, 269.74182128906);
CreateObject(1418, 1277.8000488281, -1292.9000244141, 16.60000038147, 270.2470703125, 0, 269.74182128906);
CreateObject(1418, 1279.1999511719, -1292.9000244141, 16.60000038147, 270.2470703125, 0, 269.74182128906);
CreateObject(1418, 1277.8000488281, -1294.6999511719, 16.60000038147, 270.2470703125, 0, 269.74182128906);
CreateObject(1418, 1279.1999511719, -1294.6999511719, 16.60000038147, 270.24719238281, 0, 269.74182128906);
CreateObject(1418, 1280.5999755859, -1292.9000244141, 16.60000038147, 270.2470703125, 0, 269.74182128906);
CreateObject(1418, 1281.9000244141, -1292.9000244141, 16.60000038147, 270.2470703125, 0, 269.74182128906);
CreateObject(1418, 1281.9000244141, -1294.6999511719, 16.60000038147, 270.2470703125, 0, 269.74182128906);
CreateObject(1418, 1280.5999755859, -1294.6999511719, 16.60000038147, 270.24719238281, 0, 269.74182128906);
CreateObject(1418, 1283.5, -1293, 13.199999809265, 0, 0, 89);
CreateObject(1418, 1283.5, -1293, 14.60000038147, 0, 0, 88.994750976563);
CreateObject(1418, 1283.5, -1293, 15.89999961853, 0, 0, 88.994750976563);
CreateObject(1418, 1282.8000488281, -1292.9000244141, 16.60000038147, 270.2470703125, 0, 269.74182128906);
CreateObject(1418, 1282.8000488281, -1294.6999511719, 16.60000038147, 270.2470703125, 0, 269.74182128906);
CreateObject(1418, 1283.5, -1294.6999511719, 13.199999809265, 0, 0, 88.994750976563);
CreateObject(1418, 1283.5, -1294.6999511719, 14.5, 0, 0, 88.994750976563);
CreateObject(1418, 1283.5, -1294.6999511719, 15.89999961853, 0, 0, 88.994750976563);
Fahrschultor2 = CreateObject(983, 1279.5999755859, -1296.3000488281, 13, 0, 0, 270); // Befehl: /fstor2
CreateObject(1237, 1276.0999755859, -1296.0999755859, 12.300000190735, 0, 0, 0);
CreateObject(1237, 1283.0999755859, -1296.1999511719, 12.300000190735, 0, 0, 0);
Die Autos auch bei OnGameModeInit einfügen:
//Fahrschulcars
AddStaticVehicle(522,1277.3315,-1293.7582,12.8981,180.8118,1,1); // FSMOTORRAD
AddStaticVehicle(522,1278.7616,-1293.6431,12.9046,177.8273,1,1); // FSMOTORRAD
AddStaticVehicle(522,1279.9275,-1294.0704,12.9134,180.0912,1,1); // FSMOTORRAD
AddStaticVehicle(522,1281.0972,-1294.0778,12.9209,176.5483,1,1); // FSMOTORRAD
AddStaticVehicle(436,1283.9252,-1378.2866,13.2147,0.9041,1,1); // FSAUTO
AddStaticVehicle(436,1283.7477,-1370.1652,13.2158,0.6778,1,1); // FSAUTO
AddStaticVehicle(436,1283.5844,-1361.6294,13.2181,359.7389,1,1); // FSAUTO
AddStaticVehicle(436,1283.8652,-1352.9802,13.2338,359.7758,1,1); // FSAUTO
AddStaticVehicle(436,1283.6903,-1343.9594,13.2309,359.0086,1,1); // FSAUTO
AddStaticVehicle(403,1274.6411,-1371.1989,13.9245,2.7830,1,1); // FSLKW
AddStaticVehicle(561,1274.3716,-1358.2322,13.2146,0.0266,1,1); // FSSTRATUM
AddStaticVehicle(487,1294.7286,-1297.5659,35.8386,88.4796,1,1); // FSHELI
AddStaticVehicle(487,1302.3854,-1310.6260,35.8280,87.7845,1,1); // FSHELI
Nun schreibt ihr bei OnPlayerCommendText folgendes rein:
if(strcmp(cmdtext,"/fstor",true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid,5.0,1269.6999511719, -1338, 15.10000038147))
{
MoveObject(Fahrschultor,1269.6999511719, -1338, 15.10000038147-10,3.0);
SetTimer("CloseFStor", 5000,false);
SetTimerEx("PlaySoundForPlayer",2000,0,"id",playerid,1036);
SendClientMessage(playerid,Blau, "Das Tor ist offen!");
}
else
{
SendClientMessage(playerid,Rot, "Du bist nicht am Tor von der Fahrschule!");
}
return 1;
}
if(strcmp(cmdtext,"/fstor2",true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid,5.0,1279.5999755859, -1296.3000488281, 13))
{
MoveObject(Fahrschultor2,1279.5999755859, -1296.3000488281, 13-10,3.0);
SetTimer("CloseFS2tor", 5000,false);
SetTimerEx("PlaySoundForPlayer",2000,0,"id",playerid,1036);
SendClientMessage(playerid,Blau, "Das Mottoradtor ist offen!");
}
else
{
SendClientMessage(playerid,Rot,"Du bist nicht am Mottoradtor von der Fahrschule!");
}
return 1;
}
if(strcmp(cmdtext, "/flift", true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 4.0, 1285.9225,-1308.2423,13.5437))
{
SetPlayerPos(playerid, 1319.2855,-1298.2687,35.6586);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
}
else if(IsPlayerInRangeOfPoint(playerid, 4.0, 1319.2855,-1298.2687,35.6586))
{
SetPlayerPos(playerid, 1285.9225,-1308.2423,13.5437);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
}
}
return 1;
}
//Ihr müsst es selber machen, damit nur die Fahrschule die Tore öffnen kann!
Nun geht ihr Ganz runter und schreibt noch dass hin, damit die Tore automatisch zu gehen:
forward CloseFStor();
public CloseFStor()
{
MoveObject(Fahrschultor,1269.6999511719, -1338, 15.10000038147,3);
return 1;
}
forward CloseFS2tor();
public CloseFS2tor()
{
MoveObject(Fahrschultor2,1279.5999755859, -1296.3000488281, 13,3);
return 1;
}
Das War's
Have fun!
//Edit: Bewerten wäre schön mit 0-10
aber bitte nicht sohart, ist meine 5 Map x.x