SA-MP Forums Archive
Tag mismatch for random spawns, can't figure out why. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Tag mismatch for random spawns, can't figure out why. (/showthread.php?tid=405586)



Tag mismatch for random spawns, can't figure out why. - RajatPawar - 07.01.2013

Solved, thanks to dr.lozer, can someone delete this?


Re: Tag mismatch for random spawns, can't figure out why. - dr.lozer - 07.01.2013

try this

pawn Код:
new Float:copspawns[][]= // dont put any arrays
{
    {1607.7186,-1726.2651,13.5360,181.7934},
    {1568.0874,-1696.5056,5.8906,179.2618},
    {1529.3446,-1653.9948,5.8906,274.4927}
};
//----------------------------------------
public OnPlayerSpawn(playerid)
{
   // new Float:randcop= random(sizeof(copspawns)); you added "Float:" thats why it gives warning
   new randcop= random(sizeof(copspawns));
   if(Team[playerid]==TEAM_COP) //Team is the var for storing the team.
   {
      SetPlayerPos(playerid,copspawns[randcop][0],copspawns[randcop][1],copspawns[randcop][2]);
      SetPlayerFacingAngle(playerid,copspawns[randcop][3]);
   }
   return 1;
}