Efficient Map Changing System... -
Littlehelper - 11.06.2012
Hello,
I want a efficient Map Changing System, not with Timer, but with a amount of kills.
I have two teams, Team Blue and Team Red, the first one to achieve the kills will win the round and another map will start. EX: %d/50.
I've been using Timer with my Map changing system but it isint efficient + it is very poorly scripted.
So if someone can help me with it.
It will be appreciated muchly.
Thanks.
Re: Efficient Map Changing System... -
JhnzRep - 11.06.2012
pawn Code:
public OnPlayerDeath(playerid, killerid, reason)
{
if(PlayerInfo[killerid][Team] == 1)
{
TeamKills[PlayerInfo[killerid][Team]]++
if(TeamKills[PlayerInfo[killerid][Team]] => 50)
{
//Code to change map.
}
}
}
This is just a example of how it would work.
Re: Efficient Map Changing System... -
Littlehelper - 11.06.2012
I got the part on how to make scoring system for team thanks for that, but i also asked for an Map Changing System ( An Efficient One ) because the one i made is with Timers and they get bugged all the time.
Thanks.
EDIT: Also, to announce which team won.
Re: Efficient Map Changing System... -
JhnzRep - 11.06.2012
When a score reaches for example 50, then change the map. I don't have your code..I can't do it for you.
Re: Efficient Map Changing System... -
Littlehelper - 12.06.2012
.....
I'm here asking for a map changing system mate (well an efficient one). And you are saying 'Change The Map' ..?
AW: Efficient Map Changing System... -
Extremo - 12.06.2012
This is not the appropriate section...
https://sampforum.blast.hk/showthread.php?tid=187229
Re: AW: Efficient Map Changing System... -
Littlehelper - 12.06.2012
Quote:
Originally Posted by Extremo
|
Thank you for posting, you just gained 1 post.
Now how about you help me?...
AW: Efficient Map Changing System... -
Extremo - 12.06.2012
Right,
You are requesting us to make you an efficient map changing system are you not? Well this isn't the section for that. if however you're just asking what you need in order to make an efficient map changing system? Simple:
pawn Code:
new Tickets[MAX_TEAMS];
public OnPlayerDeath(playerid, killerid, reason)
{
// check if guy is in team
if(playerid == team)
{
Tickets[team]--;
}
for(new i = 0; i < MAX_TEAMS; i++)
{
if(!Tickets[i]) ChangeMap();
}
No timer involved, all you do is count the tickets on death which you would have anyway and you then check if one of the teams has reached zero tickets - and change the map. How else would you be doing it? You could obviously if you believe that those couple nanoseconds are too much on every kill, simply write a multithreaded plugin that holds your tickets and you call a native everytime that calculates the tickets internally and calls the callback on ProcessTick that one team has run out of tickets, but I highly doubt that is necessary.
The rest is up to you. We are not here to make the scripts for you but to point you in the right direction =).
Regards.
Re: Efficient Map Changing System... -
Littlehelper - 12.06.2012
dafuq did i just read?
however, thanks.
I got it, i guess.
AW: Re: Efficient Map Changing System... -
Extremo - 12.06.2012
Quote:
Originally Posted by Littlehelper[MDZ]
dafuq did i just read?
however, thanks.
I got it, i guess.
|
I'd be glad to explain any confusion I may have caused you. Where exactly I am I misunderstood at? If you didn't understand any of what I just said that's fine as well I can try in a different way. Absolutely no problem =).
Just point me to the place where you stopped following me and I'll try and explain.
Regards.