DM spawn after death
#1

I created a DM zone and my problem is that when a player die it spawns it at random spawn positions. I want to spawn again in the the area. How can i do this?
here is my code from the teleport:
pawn Код:
CMD:minigun(playerid, params[])
    {
        if(GetPVarType(playerid, "DMZONE") != 0) return SendClientMessage(playerid, red, "bla bla!(/leavedm)");
        SetPVarInt(playerid, "DMZONE", 1); // set the pvar to show that they're in a DM zone
        if(Teled[playerid] == 1) return SendClientMessage(playerid,red," test...(/leavedm)");
        Teled[playerid] = 1;
        new mR = random(sizeof(MinigunRandom));
        SetPlayerPos(playerid, MinigunRandom[mR][0], MinigunRandom[mR][1], MinigunRandom[mR][2]);
        GameTextForPlayer(playerid, "~w~minigun deathmatch", 4000, 6);
        SetPlayerInterior(playerid, 0);
        new pName[24];
        new str[128];
        GetPlayerName(playerid, pName, 24);
        format(str, 128, "%s joined /minigun", pName);
        SendClientMessageToAll(COLOR_TELEPORT, str);
        SetPlayerInterior(playerid, 0);
        SetPlayerHealth(playerid, 100);
        GivePlayerWeapon(playerid, 38, 99999999);

        return 1;
    }
Reply


Messages In This Thread
DM spawn after death - by martoivanov - 20.06.2013, 16:45
Re: DM spawn after death - by dEcooR - 20.06.2013, 16:47
Re: DM spawn after death - by martoivanov - 20.06.2013, 16:48
Re: DM spawn after death - by dEcooR - 20.06.2013, 16:50
Re: DM spawn after death - by martoivanov - 20.06.2013, 16:52
Re: DM spawn after death - by Niko_boy - 20.06.2013, 16:54
Re: DM spawn after death - by dEcooR - 20.06.2013, 16:56
Re: DM spawn after death - by martoivanov - 20.06.2013, 17:08
Re: DM spawn after death - by dEcooR - 20.06.2013, 17:56
Re: DM spawn after death - by martoivanov - 21.06.2013, 10:43

Forum Jump:


Users browsing this thread: 1 Guest(s)