SA-MP Forums Archive
SetSpawnInfo - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: SetSpawnInfo (/showthread.php?tid=246306)



SetSpawnInfo - xir - 03.04.2011

Hello, I am having some problems with SetSpawnInfo.

I've done this, and it isnt setting the player Interior,

pawn Код:
COMMAND:joinbase(playerid, params[])
{
    if(BaseOn == 0) return SendClientMessage(playerid, Red, "There is no base in progress");
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        new rand = random(sizeof(RandomSpawn));
        SetPlayerInterior(playerid, 15);
        SetSpawnInfo(i, T_ATT, 1, RandomSpawn[rand][0], RandomSpawn[rand][1],RandomSpawn[rand][2], RandomSpawn[rand][3], 24, 500, 26, 500, 34, 500);
        SetSpawnInfo(i, T_DEF, 260, RandomSpawn[rand][0], RandomSpawn[rand][1],RandomSpawn[rand][2], RandomSpawn[rand][3], 24, 500, 26, 500, 34, 500);
    }
    return 1;
}



Re: SetSpawnInfo - antonio112 - 04.04.2011

You need to set 'i' interior to 15 ... not playerid`s interior, since you used a loop.