itt a továbbfejlesztett változat!
#include <a_samp>
new map;
new Float:RandomSpawns1[][] =
{
{1249.7258, -2047.9263, 59.9209, 90.2055}, // Randomspawn
{1241.2084, -2057.6521, 60.0190, 94.9352}, // Randomspawn
{1241.0105, -2052.6873, 59.9975, 2.8144}, // Randomspawn
{718.4906, -1477.3024, 5.4688, 357.9947}, // Randomspawn
{722.3772, -1477.2856, 5.4688, 272.3814} // Randomspawn
};
new Float:RandomSpawns2[][] =
{
{1249.7258, -2047.9263, 59.9209, 90.2055}, // Randomspawn
{1241.2084, -2057.6521, 60.0190, 94.9352}, // Randomspawn
{1241.0105, -2052.6873, 59.9975, 2.8144}, // Randomspawn
{718.4906, -1477.3024, 5.4688, 357.9947}, // Randomspawn
{722.3772, -1477.2856, 5.4688, 272.3814} // Randomspawn
};
new Float:RandomSpawns3[][] =
{
{1249.7258, -2047.9263, 59.9209, 90.2055}, // Randomspawn
{1241.2084, -2057.6521, 60.0190, 94.9352}, // Randomspawn
{1241.0105, -2052.6873, 59.9975, 2.8144}, // Randomspawn
{718.4906, -1477.3024, 5.4688, 357.9947}, // Randomspawn
{722.3772, -1477.2856, 5.4688, 272.3814} // Randomspawn
};
new Float:RandomSpawns4[][] =
{
{1249.7258, -2047.9263, 59.9209, 90.2055}, // Randomspawn
{1241.2084, -2057.6521, 60.0190, 94.9352}, // Randomspawn
{1241.0105, -2052.6873, 59.9975, 2.8144}, // Randomspawn
{718.4906, -1477.3024, 5.4688, 357.9947}, // Randomspawn
{722.3772, -1477.2856, 5.4688, 272.3814} // Randomspawn
};
new Float:RandomSpawns5[][] =
{
{1249.7258, -2047.9263, 59.9209, 90.2055}, // Randomspawn
{1241.2084, -2057.6521, 60.0190, 94.9352}, // Randomspawn
{1241.0105, -2052.6873, 59.9975, 2.8144}, // Randomspawn
{718.4906, -1477.3024, 5.4688, 357.9947}, // Randomspawn
{722.3772, -1477.2856, 5.4688, 272.3814} // Randomspawn
};
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print(\"\\n--------------------------------------\");
print(\" Mapchange system by BenCarter007\");
print(\"--------------------------------------\\n\");
SetTimer(\"mapchange\",120000, true);
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print(\"\\n----------------------------------\");
print(\" Blank Gamemode by your name here\");
print(\"----------------------------------\\n\");
}
#endif
public OnGameModeInit()
{
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerSpawn(playerid)
{
if (map == 1)
{
new Random = random(sizeof(RandomSpawns1));
SetPlayerPos(playerid, RandomSpawns1[Random][0], RandomSpawns1[Random][1], RandomSpawns1[Random][2]);
SetPlayerFacingAngle(playerid, RandomSpawns1[Random][3]);
}
if (map == 2)
{
new Random = random(sizeof(RandomSpawns1));
SetPlayerPos(playerid, RandomSpawns2[Random][0], RandomSpawns2[Random][1], RandomSpawns2[Random][2]);
SetPlayerFacingAngle(playerid, RandomSpawns2[Random][3]);
}
if (map == 3)
{
new Random = random(sizeof(RandomSpawns1));
SetPlayerPos(playerid, RandomSpawns3[Random][0], RandomSpawns3[Random][1], RandomSpawns3[Random][2]);
SetPlayerFacingAngle(playerid, RandomSpawns3[Random][3]);
}
if (map == 4)
{
new Random = random(sizeof(RandomSpawns1));
SetPlayerPos(playerid, RandomSpawns4[Random][0], RandomSpawns4[Random][1], RandomSpawns4[Random][2]);
SetPlayerFacingAngle(playerid, RandomSpawns4[Random][3]);
}
if (map == 5)
{
new Random = random(sizeof(RandomSpawns1));
SetPlayerPos(playerid, RandomSpawns5[Random][0], RandomSpawns5[Random][1], RandomSpawns5[Random][2]);
SetPlayerFacingAngle(playerid, RandomSpawns5[Random][3]);
}
return 1;
}
forward mapchange();
public mapchange()
{
if (map == 1)
{
map = 2;
}
if (map == 2)
{
map = 3;
}
if (map == 3)
{
map = 5;
}
if (map == 4)
{
map = 1;
}
}
kicsid szétdobálta a fórum, úgyhogy az OnPlayerSpawn-nál a szóközökkel kezdj majd valamit!