[help] with DM
#1

hi!
i built a deathmatcharena today with random spawns...
(/deathmatch)
now i want to add some things:

1. The random spawn doesnt work "perfect"
I want that you respawn IN THE DMARENA if you die there -> here is the script:

Код:
new InDm[MAX_PLAYERS] = 0;
new Float:DMSpawn[][10] =
{
       {555.017395, 2876.487304, 3.827838},
       {556.508056, 2932.969482, 4.213321},
	{583.509826, 2956.563232, 11.022232},
	{583.248596, 2956.373535, 19.422161},
	{613.906372, 2966.900634, 8.801957},
	{635.815551, 3020.493164, 3.087232},
	{593.451171, 3056.166503, 3.230519},
	{620.233947, 2918.290527, 3.558469},
	{609.661682, 2898.529052, 3.376594},
	{582.865478, 2864.914062, 3.281667}
}
In public OnPlayerCommandText
Код:
	if(!strcmp(cmd, "/deathmatch", true))
	{
		InDm[playerid] = 1;
		new iRandom = random(sizeof(DMSpawn));
		SetPlayerPos(playerid, DMSpawn[iRandom][0], DMSpawn[iRandom][1],DMSpawn[iRandom][2]);
		GivePlayerWeapon(playerid,35,500);
		GivePlayerWeapon(playerid,30,500);
		GivePlayerWeapon(playerid,25,500);
		GivePlayerWeapon(playerid,8,1);
		return 1;
	}
in public OnPlayerSpawn()
Код:
	if(InDm[playerid] == 1)
	{
		new iRandom = random(sizeof(DMSpawn));
		SetPlayerPos(playerid, DMSpawn[iRandom][0], DMSpawn[iRandom][1],DMSpawn[iRandom][2]);
	}
But If i respawn im not in the DMarena -> whats wrong?

2. I want to do that that there is ONLY one command avaible(-> back)
How can i do that?

3. I want to make a "round" -> You can join everytime and each kill gives you 1 point. If someone have 10 points he won the "round" and get money... Then it starts from the beginning -> everyone spawnsnew in the DMarena and it starts to count at 0 again..
Reply
#2

Firstable change DMSpawn:
Код:
new Float:DMSpawn[10][3] =
{
       {555.017395, 2876.487304, 3.827838},
       {556.508056, 2932.969482, 4.213321},
	{583.509826, 2956.563232, 11.022232},
	{583.248596, 2956.373535, 19.422161},
	{613.906372, 2966.900634, 8.801957},
	{635.815551, 3020.493164, 3.087232},
	{593.451171, 3056.166503, 3.230519},
	{620.233947, 2918.290527, 3.558469},
	{609.661682, 2898.529052, 3.376594},
	{582.865478, 2864.914062, 3.281667}
}
Reply
#3

Quote:
Originally Posted by Swistack92
Firstable change DMSpawn:
Код:
new Float:DMSpawn[10][3] =
{
       {555.017395, 2876.487304, 3.827838},
      {556.508056, 2932.969482, 4.213321},
	{583.509826, 2956.563232, 11.022232},
	{583.248596, 2956.373535, 19.422161},
	{613.906372, 2966.900634, 8.801957},
	{635.815551, 3020.493164, 3.087232},
	{593.451171, 3056.166503, 3.230519},
	{620.233947, 2918.290527, 3.558469},
	{609.661682, 2898.529052, 3.376594},
	{582.865478, 2864.914062, 3.281667}
}
Doesnt work! PLEASE HELP MEEEEEE!!!!!
Reply
#4

lol , i very loled , dont be lazy to search on ******* or ****** , that will help you so much , btw you made my day
Reply
#5

pawn Код:
new DMSpawns = random(10);
switch(DMSpawns)
{
case 0: SetPlayerPos(playerid,555.017395, 2876.487304, 3.827838);
case 1: SetPlayerPos(playerid,556.508056, 2932.969482, 4.213321);
case 2: SetPlayerPos(playerid,583.509826, 2956.563232, 11.022232);
case 3: SetPlayerPos(playerid583.248596, 2956.373535, 19.422161);
case 4: SetPlayerPos(playerid613.906372, 2966.900634, 8.801957);
case 5: SetPlayerPos(playerid635.815551, 3020.493164, 3.087232);
case 6: SetPlayerPos(playerid593.451171, 3056.166503, 3.230519)
case 7: SetPlayerPos(playerid582.865478, 2864.914062, 3.281667);
case 8: SetPlayerPos(playerid620.233947, 2918.290527, 3.558469);
case 9: SetPlayerPos(playerid609.661682, 2898.529052, 3.376594);
}


8
{},
{},






Reply
#6

Quote:
Originally Posted by Enemy_Plus[SA:MP
]
pawn Код:
new DMSpawns = random(10);
switch(DMSpawns)
{
case 0: SetPlayerPos(playerid,555.017395, 2876.487304, 3.827838);
case 1: SetPlayerPos(playerid,556.508056, 2932.969482, 4.213321);
case 2: SetPlayerPos(playerid,583.509826, 2956.563232, 11.022232);
case 3: SetPlayerPos(playerid583.248596, 2956.373535, 19.422161);
case 4: SetPlayerPos(playerid613.906372, 2966.900634, 8.801957);
case 5: SetPlayerPos(playerid635.815551, 3020.493164, 3.087232);
case 6: SetPlayerPos(playerid593.451171, 3056.166503, 3.230519)
case 7: SetPlayerPos(playerid582.865478, 2864.914062, 3.281667);
case 8: SetPlayerPos(playerid620.233947, 2918.290527, 3.558469);
case 9: SetPlayerPos(playerid609.661682, 2898.529052, 3.376594);
}


8
{},
{},






and what do i write at OnplayerCommand Text (/deathmatch)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)