Arena
#6

Quote:
Originally Posted by Ananisiki
View Post
Problem is that if a person dies inside there, he doesn't spawn back in there,

pawn Code:
// under OnPlayerDeath
    if(InDMS[playerid] == 1)
    {
        new Random = random(sizeof(RandomDMSpawns));
        SetPlayerPos(playerid, RandomDMSpawns[Random][0], RandomDMSpawns[Random][1], RandomDMSpawns[Random][2]);
        SetPlayerFacingAngle(playerid, RandomDMSpawns[Random][3]);
        SetTimer("DMSTimer", 3000, false);
    }
i didn't code for a while so i might not be that familiar with samp's callbacks as i was before.
But im quiet sure that when you put that under onplayerdeath, like you did.
It's not gonna work. the player is dying... he'll be spawned after that.
so you might put that under onplayerspawn

also, idk if onplayerspawn is called when you do setplayerpos
so if you end up in an endless loop of spawning... just set InDMS[playerid] to 0 after the first time

just try... that's what it is all about, self-experience.
just fool around with some code, that's how you'll learn it
Reply


Messages In This Thread
Arena - by Ananisiki - 02.03.2014, 21:22
Re: Arena - by GrassHopper101 - 02.03.2014, 21:45
Re: Arena - by GrassHopper101 - 02.03.2014, 21:48
Re: Arena - by Ananisiki - 02.03.2014, 22:09
Re: Arena - by Ananisiki - 03.03.2014, 17:24
Re: Arena - by CutX - 03.03.2014, 17:33
Re: Arena - by Ananisiki - 03.03.2014, 22:40

Forum Jump:


Users browsing this thread: 2 Guest(s)