Show us
"RandomSpawn"
Assuming this is your "RandomSpawn"
PHP код:
new rand = random(sizeof(RandomSpawn));
new Float:RandomSpawn[][7] =
{
//Positions,(X,Y,ZandFacingAngle)
{-873.1492,-1929.0703,24.6819,351.9071},
{-879.4926,-1911.9144,38.0141,42.6676},
{-862.8982,-1901.0688,38.3521,357.5472},
{-881.0944,-1989.5999,25.9896,184.5856},
{-737.8086,-1837.0662,22.1271,85.9572},
{-690.7778,-1913.4591,7.2225,346.3163}
};
SetPlayerCheckpoint(playerid,RandomSpawn[rand][0],RandomSpawn[rand][1],RandomSpawn[rand][2],5);
Try it like this:
PHP код:
new Float:RandomSpawn[][4]=
{
{-873.1492,-1929.0703,24.6819,351.9071},
{-879.4926,-1911.9144,38.0141,42.6676},
{-862.8982,-1901.0688,38.3521,357.5472},
{-881.0944,-1989.5999,25.9896,184.5856},
{-737.8086,-1837.0662,22.1271,85.9572},
{-690.7778,-1913.4591,7.2225,346.3163}
};
new rand = random(sizeof(RandomSpawn));
SetPlayerCheckpoint(playerid, RandomSpawn[rand][0],RandomSpawn[rand][1],RandomSpawn[rand][2], 5);