How to set a exception to a code ?(Timers)
#1

I would like one of you to tell me how can i set a exception to my timers,codes ?

Like i tried a Map changing TDM i want to make like if someone type /tdm the timers stop for him but continues for other players
When map changes nothing happen to player in /tdm
So can anyone give me a example it would be cool thanks Q!
Reply
#2

You can't do that, since theres just a single map for all the server.
Let me ask you a question, does the map changin' needs to restart the server?
If not maybe i can help you.
Reply
#3

ofc it need to restart btw i tried it with my previous GM it worked fine the timer runs but the map doesn't change for the person in /tdm but when i tried it with other GM it isn't working :/
Reply
#4

If your server restarts to change the map it won't make a difference.
But did you mean something like this
pawn Код:
new tdm[MAX_PLAYERS];
tdm[playerid]=SetTimerEx();
KillTimer(tdm[playerid]);
//Use loops if needed
Reply and I'll try writing a simple code for you
because I don't want to waste my time writing something not needed
Please post the current code so I can improvise on that
OR Give me your server IP so I can understand what you mean
Reply
#5

it is impossible to do what ur trying to do.
what u want to do is restart the server and change the gamemode while stil keeping the players who want to continue in the old GM there. thats not possible. if needed, u can divide the whole of san andreas' map into a few phases. like LV for TDM, LS for RP, SF for abcxyz. after u do that, u can have a mapper properly divide those places.
then create commands for people like /rp /tdm /abcxyz, where the player chooses the mode they want, and they get TPed to that particular location.
u cannot restart a server AND let some poeple continue to do what they want.
cheers
Reply
#6

@RayDcosta
I said its possible i tried it and it worked but the problem is the timer stop for everyone
I once tried it some months back and i successfully did it but dunno why i can't do it now


@Kingofdemons
I don't want to create another timer and kill it but i want to stop or kill the Main timer for player going to TDM and thus having no timer for them so they can play as long as they want and the Main serer(Map changing) continues for other
Reply
#7

pawn Код:
new my_MAPchanging_TIMERS[MAX_PLAYERS] = {-1, ...};

public OnPlayerConnect( playerid ) {
   
  my_MAPchanging_TIMERS[ playerid ] = SetTimerEx( "MapChangeForPlayer", 10000, 1, "d", playerid );
  return 1;
}

CMD: I_dont_want_to_change_my_map( playerid )
{
    KillTimer( my_MAPchanging_TIMERS[ playerid ] );
    return 1;
}

public MapChangeForPlayer( playerid ) {

     MapChange - Change objects, interiors, etc.
     return 1;
}
You can do this if you change the MAP only, not the gamemode, by MAP I mean, like changing the position, interior, etc, and transporting to another place on the map.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)