27.03.2018, 14:56
I don't know what part of the code to show but Ill show u the tutorial
https://sampforum.blast.hk/showthread.php?tid=269336
basically the map doesnt change.
(tell me what part i should show according from the tutorial)
heres the onplayerspawn though
and the random positions for each map
https://sampforum.blast.hk/showthread.php?tid=269336
basically the map doesnt change.
(tell me what part i should show according from the tutorial)
heres the onplayerspawn though
Код:
public OnPlayerSpawn(playerid)
{
switch( MapChange ) {
case 0: {
new gMap1 = random( sizeof ( gMapSpawns1 ));
SetPlayerPos(playerid, gMapSpawns1[gMap1][0], gMapSpawns1[gMap1][1], gMapSpawns1[gMap1][2]);
SetPlayerFacingAngle(playerid, gMapSpawns1[gMap1][2]);
}
case 1: {
new gMap2 = random( sizeof ( gMapSpawns2 ));
SetPlayerPos(playerid, gMapSpawns2[gMap2][0], gMapSpawns2[gMap2][1], gMapSpawns2[gMap2][2]);
SetPlayerFacingAngle(playerid, gMapSpawns2[gMap2][2]);
}
}
return 1;
}
Код:
new Float:gMapSpawns1[][]= {
{2161.4529,-1639.9576,14.2731},
{2250.9717,-1650.3555,15.4772},
{2245.1152,-1704.1963,22.8594},
{2317.3740,-1748.8496,13.3822},
{2352.1912,-1673.8510,13.5314},
{2427.8057,-1612.1277,26.6325},
{2513.1516,-1659.7305,13.6431},
{2522.6194,-1752.0939,13.5469},
{2463.5796,-1794.1737,13.6728}
};
new Float:gMapSpawns2[][]= {
{2229.6516,-1141.5068,25.7969},
{2197.3640,-1082.5574,39.3104},
{2223.5845,-1051.4462,48.1517},
{2207.5991,-1008.9668,61.5210},
{2143.5073,-1004.4036,61.9231},
{2427.8057,-1612.1277,26.6325},
{2081.8887,-1049.0695,30.9284},
{2052.9575,-1105.6431,24.4322},
{2040.0748,-1217.9811,22.8408}
};


