10.12.2013, 04:22
Ive created spawns in Sql and they load perfectly,
but I'm having trouble with setting the positions to spawn randomly.
I want the script to check if the Spawn is on the same team for the player
it will select a random spawn from that team
then set it for the player.
this is what i have now
This doesn't work.. I just attempted to throw random things together to get my outcome. Help me out please
but I'm having trouble with setting the positions to spawn randomly.
I want the script to check if the Spawn is on the same team for the player
it will select a random spawn from that team
then set it for the player.
this is what i have now
pawn Код:
stock PlayerSpawn(playerid)
{
for (new i = 0; i != ReturnSpawnCounts(); ++i)
{
if(pInfo[playerid][pTeam] == sInfo[i][sTeam])
{
SetPlayerPos(playerid,sInfo[i][sPosX], sInfo[i][sPosY], sInfo[i][sPosZ]);
SetPlayerFacingAngle(playerid, sInfo[i][sPosA]);
}
}
}
This doesn't work.. I just attempted to throw random things together to get my outcome. Help me out please