Problem with string
#1

Hello Everyone,

I'm having a problem with a string that's not working on a weird way, hopefully someone can fix it for me.

pawn Код:
new Float:RandomSpawns[][] =
{
    {1443.7324,-2426.4797,15.7550,182.4360}, // Los Santos Airport
    {1474.8452,-2581.5078,13.5469,218.0661}, // Test spawn point
};
pawn Код:
public OnPlayerSpawn(playerid)
{
    new rand = random(sizeof(RandomSpawns));
    SetPlayerPos(playerid, RandomSpawns[rand][0], RandomSpawns[rand][1],RandomSpawns[rand][2]);
(No I haven't forgot to
pawn Код:
return 1;
}
at the end of the OnPlayerSpawn
Reply
#2

Do the code like this:
pawn Код:
new RandomSpawn = random(2);
switch(RandomSpawn){
case 0: //yourstuff
case 1: //your stuff}
Reply
#3

Ehm, that's useless if you're wanting more spawnpoints..
Reply
#4

You can change random's size.
Reply
#5

Fixed, nevermind
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)