new Float:SpawnLocs[][3] = {
{0.0, 0.0, 0.0},
{0.0, 0.0, 0.0},
{0.0, 0.0, 0.0}
};
new rPos = random(sizeof(SpawnLocs));
SetPlayerPos(playerid, SpawnLocs[rPos][0], SpawnLocs[rPos][1], SpawnLocs[rPos][2]);
new Float:locmgw[][4] = { (2179.2834, 1622.2817, 999.9767, 8.9377), (2173.2778, 1576.6918, 999.9637, 349.3425), (2190.0759, 1593.7576, 999.9708, 25.0665), (2196.9924, 1612.3495, 999.9675, 275.2932), (2206.8613, 1579.8500, 999.9770, 251.5817), (2222.3083, 1598.8792, 999.9706, 168.0277), (2232.3013, 1589.5380, 999.9569, 349.7713) };
if(mgw[playerid] == 1) { new spawnmgw = random(sizeof(locmgw)); SetPlayerInterior(playerid, 1); SetPlayerPos(playerid, locmgw[spawnmgw][0], locmgw[spawnmgw][1], locmgw[spawnmgw][2]); SetPlayerFacingAngle(playerid, locmgw[spawnmgw][3]); GivePlayerWeapon(playerid, 38, 111110); // minigun SetPlayerHealth(playerid, 200); }
if(mgw[playerid] == 1)
{
new spawnmgw = random(sizeof(locmgw));
SetPlayerPos(playerid, locmgw[spawnmgw][0], locmgw[spawnmgw][1], locmgw[spawnmgw][2]);
SetPlayerInterior(playerid, 1);
SetPlayerFacingAngle(playerid, locmgw[spawnmgw][3]);
GivePlayerWeapon(playerid, 38, 111110); // minigun
SetPlayerHealth(playerid, 200);
}
pawn Код:
|
pawn Код:
|
i almost got it to work..
but i spawn out in nowhere and i have triple checked the cord and i have no warnings or errors. at the top of my script: Код:
new Float:locmgw[][4] = { (2179.2834, 1622.2817, 999.9767, 8.9377), (2173.2778, 1576.6918, 999.9637, 349.3425), (2190.0759, 1593.7576, 999.9708, 25.0665), (2196.9924, 1612.3495, 999.9675, 275.2932), (2206.8613, 1579.8500, 999.9770, 251.5817), (2222.3083, 1598.8792, 999.9706, 168.0277), (2232.3013, 1589.5380, 999.9569, 349.7713) }; Код:
if(mgw[playerid] == 1) { new spawnmgw = random(sizeof(locmgw)); SetPlayerInterior(playerid, 1); SetPlayerPos(playerid, locmgw[spawnmgw][0], locmgw[spawnmgw][1], locmgw[spawnmgw][2]); SetPlayerFacingAngle(playerid, locmgw[spawnmgw][3]); GivePlayerWeapon(playerid, 38, 111110); // minigun SetPlayerHealth(playerid, 200); } |
You're using the wrong bracket type for the initialization of the multi-dimensional array containing the co-ordinates, you should be using the curly brackets "{ }" instead of the smooth brackets "( )".
|