TimeLeft & MapChanger - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: TimeLeft & MapChanger (
/showthread.php?tid=388736)
TimeLeft & MapChanger -
Alex Magaсa - 30.10.2012
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)
Re: TimeLeft & MapChanger -
czel - 30.10.2012
Do you mean Map Changer as setting players positions to a new map?
Re: TimeLeft & MapChanger -
[HK]Ryder[AN] - 30.10.2012
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..
}
}
}
Re: TimeLeft & MapChanger -
Alex Magaсa - 31.10.2012
Thanks i will test them :] +rep!
but if im using gTeam how i can do that in mapchanger?