TimeLeft & MapChanger
#1

Hello SA-MP Players,
Im requesting a TimeLeft Textdraw im trying to make a server andi really want a timeleft example: Textdraw: 1hour & 20mins left..!

Also im requesting a MapChanger,i don't know how to create one :[!
Help me(+++REP)
Reply
#2

Do you mean Map Changer as setting players positions to a new map?
Reply
#3

Timeleft code
pawn Код:
new str[50];
            cptime1 = SetTimer("cptime",15000/*time in seconds here..replace the 15000 with it*/,false);
            format(str,sizeof(str),"%d",cptime1);
            TextDrawSetString(timer/*Textdraw name*/,str);
            TextDrawShowForPlayer(playerid,timer/*textdraw name*/);
Mapchanger code
pawn Код:
//add this at the top
new Cmaps;

//you only need the timer once !
//put it "OnPlayerConnect" or wherever you want! but if using it like OnPlayerSpawn you will need to kill the timer //so i will suggest you dont use it there.
SetTimerEx("NextMap", 20000, true, "i", 10);//not the number "10" at the end is for the maximum maps you will have !


forward NextMap(maps);
public NextMap(maps)
{
Cmaps++;
if(maps>= Cmaps) Cmaps=0;
switch(Cmaps)
{
     case 0:{
          for(new playerid; playerid<GetMaxPlayers(); playerid++)//this will loop through all you players
          {
               SetPlayerPos(playerid,X,Y,Z);//this is the 1st MAP
          }
     }
     case 1:{
          for(new playerid; playerid<GetMaxPlayers(); playerid++)
          {
               SetPlayerPos(playerid,X,Y,Z);//this is the 2st MAP
          }
     case 2:{
          for(new playerid; playerid<GetMaxPlayers(); playerid++)
          {
               SetPlayerPos(playerid,X,Y,Z);//this is the 3st MAP
          }
//and you just continue like that..
     }
}
}
Reply
#4

Thanks i will test them :] +rep!
but if im using gTeam how i can do that in mapchanger?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)