// Object News
new map;
new map1;
new map2;
public OnGameModeInit()
{
map = CreateObject(4242, 3188.4460449219, -601.98657226563, 755.99273681641, 0, 0, 0);
map = CreateObject(8391, 3115.5949707031, -496.81387329102, 776.64813232422, 0, 0, 270);
map = CreateObject(8419, 3196.4077148438, -451.6633605957, 767.49530029297, 0, 0, 270);
map = CreateObject(8421, 3274.748046875, -482.78826904297, 782.52081298828, 0, 0, 338);
map = CreateObject(8434, 3294.7260742188, -555.03863525391, 760.94976806641, 0, 0, 0);
map = CreateObject(8489, 3117.6520996094, -663.26647949219, 779.25494384766, 0, 0, 184);
map = CreateObject(10610, 3297.3947753906, -616.71960449219, 766.478515625, 0, 0, 92);
map = CreateObject(10143, 3295.7016601563, -660.88232421875, 787.59313964844, 0, 0, 50);
map = CreateObject(6205, 3297.4460449219, -707.72235107422, 763.80480957031, 0, 0, 0);
map = CreateObject(6966, 3265.3959960938, -739.67883300781, 755.85162353516, 0, 0, 270);
map = CreateObject(9907, 3180.2082519531, -740.54907226563, 818.61285400391, 0, 0, 0);
map = CreateObject(9907, 3204.0231933594, -740.66223144531, 818.61285400391, 0, 0, 0);
map = CreateObject(4019, 3056.919921875, -553.01208496094, 754.74487304688, 0, 0, 0);
map = CreateObject(4019, 3120.4912109375, -562.80987548828, 754.74487304688, 0, 0, 0);
map = CreateObject(3307, 3106.1003417969, -491.3313293457, 756.74273681641, 0, 0, 0);
map = CreateObject(3308, 3106.1857910156, -517.51611328125, 756.31365966797, 0, 0, 0);
map = CreateObject(3588, 3136.2319335938, -518.31762695313, 758.66711425781, 0, 0, 0);
map = CreateObject(3588, 3136.1540527344, -492.40960693359, 758.66711425781, 0, 0, 0);
map = CreateObject(4178, 3110.0092773438, -712.01831054688, 759.73962402344, 0, 0, 0);
map = CreateObject(4178, 3108.1169433594, -687.75799560547, 759.73962402344, 0, 0, 180);
map = CreateObject(7535, 3131.6047363281, -683.21929931641, 758.40661621094, 0, 0, 292);
map = CreateObject(8428, 3145.248046875, -626.82525634766, 759.23309326172, 0, 0, 0);
map = CreateObject(8428, 3156.4582519531, -660.283203125, 759.23309326172, 0, 0, 36);
map = CreateObject(8428, 3112.3154296875, -628.96875, 759.23309326172, 0, 0, 272);
map = CreateObject(17034, 3210.91015625, -528.24212646484, 749.99273681641, 0, 0, 0);
map = CreateObject(13635, 3170.2446289063, -557.77923583984, 758.09265136719, 0, 0, 0);
map = CreateObject(17034, 3205.4765625, -572.41839599609, 749.99273681641, 0, 0, 310);
map = CreateObject(16118, 3258.5036621094, -585.82427978516, 750.74273681641, 0, 0, 0);
map = CreateObject(16675, 3244.0209960938, -682.37622070313, 753.68804931641, 0, 0, 0);
map = CreateObject(898, 3204.6748046875, -617.67370605469, 757.35321044922, 0, 0, 0);
map = CreateObject(898, 3172.8818359375, -600.85223388672, 757.35321044922, 0, 0, 0);
map = CreateObject(898, 3174.6101074219, -650.08410644531, 757.35321044922, 0, 0, 0);
map = CreateObject(898, 3174.2075195313, -507.73120117188, 757.35321044922, 0, 0, 0);
map = 1;
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mapswitch", cmdtext, true) == 0)
{
if (map == 1)
{
DestroyObject(map);
CreateObject(map1);
map = 0;
map1 = 1;
}
else if(map1 ==1)
{
DestroyObject(map1);
CreateObject(map2);
map1 = 0;
map2 = 1;
}
else if(map2 == 1)
{
DestroyObject(map2);
CreateObject(map);
map2 = 0;
map = 1;
}
}
return 0;
}
Achja, weil bisher nur Objecte mit Map definiert wurde möchte ich hinweisen, dass ich nur wissen will ob das unten im cmd so klappt und wenn ja, ob ich die warnings entfernen kann. Denn die Sache is ja noch am anfang und ich scripte erst weiter wenn ich weiß, ob es so korrekt ist.