20.06.2013, 16:45
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:
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;
}