Dm Spawns.. - 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: Dm Spawns.. (
/showthread.php?tid=166953)
Dm Spawns.. -
[Ha]Lommo - 10.08.2010
Well i need some help with dmspawns:
i got this:
pawn Код:
new Float:RndSpawn[][4] =
{
{876.4921,-1629.8173,472.0000},
{872.2332,-1656.1550,461.4319},
{868.4327,-1696.1603,461.4319},
{798.4766,-1697.2549,461.4319},
{686.6400,-1694.6133,461.4319},
{694.9424,-1639.3251,461.4319},
{757.8431,-1581.5529,461.4319}
};
nd This:
pawn Код:
if(strcmp(cmdtext, "/dm1", true) == 0) {
new str[128];
new iRandom = random(sizeof(RndSpawn));
SetPlayerPos(playerid, RndSpawn[iRandom][0], RndSpawn[iRandom][1],RndSpawn[iRandom][2]);
SetPlayerFacingAngle(playerid, RndSpawn[iRandom][3]);
GetPlayerName(playerid, str, sizeof(str)); format(str, sizeof(str), "%s Has joined the minigun-dm!(/dm1)", str);
SendClientMessageToAll(COLOR_GREEN, str);
GivePlayerWeapon(playerid, 38, 9999999);
SetPlayerVirtualWorld(playerid, 3);
SetPlayerArmour(playerid, 100);
InDm[playerid] = 1;
But when someone dies in a dm he spawns at the "AddPlayerClass" place.. I want him to spawn at one of the random spawns.
Re: Dm Spawns.. -
Dudits - 10.08.2010
Set a variable to detect if the player's in DM arena.
Under OnPlayerSpawn, add this.
pawn Код:
if(variable)
{
SetPlayerPos(playerid, RndSpawn[iRandom][0], RndSpawn[iRandom][1],RndSpawn[iRandom][2]);
SetPlayerFacingAngle(playerid, RndSpawn[iRandom][3]);
}
Re: Dm Spawns.. -
[Ha]Lommo - 10.08.2010
Thanks, worked