07.10.2009, 13:46
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:
In public OnPlayerCommandText
in public OnPlayerSpawn()
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..
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}
}
Код:
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;
}
Код:
if(InDm[playerid] == 1)
{
new iRandom = random(sizeof(DMSpawn));
SetPlayerPos(playerid, DMSpawn[iRandom][0], DMSpawn[iRandom][1],DMSpawn[iRandom][2]);
}
?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..

