3 rounds in the Map Change ?
#1

Hi , i have a map change system by Kitten (credits to him) , the problem is whene i connect , i go to a Map (i didn't have this map in the GM) , then my Map 1 then Map 2 , then a Map(who i don't have) , then....

so how to delete the the first Map (not map 1 but the Map 0 ).

so i gave the code again to Kitten , he said that there are no errors , where can you think the error comes? thanks
Reply
#2

Show us the code.
Reply
#3

I had the same problem with a server my scripter scripted for me
if you want to delete 1 of that maps (map0)
you have to go to the top and search for the map activate lines
delete then the one Map 0
and add a start on map 1 ( not start from map 0)
or you change the the maps of the (maplines)
like make map 1 to map 0 (copy the map/object lines) into the section of map 0
then you can make that with map 2 aswell and delete map 3
rename map 0 to map 1 so that you got the same script of map 0 but with a different name and (mainmap)

srry for
my bad english im german
Reply
#4

@redreaper : yea u have the same map change i think , cause in the top there are map =0
@T0pAz : here is the full map change
pawn Код:
// ON THE TOP
new Map = 0;

//---Most of these problems are from you're own coding but i've fixed them and i've added these new functions/variables etc---//
//---I've also fixed the indention of the code---//

/*stock PlayerName(playerid) Use this instead of the playername you got.
{
    new name[MAX_PLAYER_NAME];
    if(IsPlayerConnected(playerid))
    {
        if(GetPlayerName(playerid, name, sizeof name))
        {
            for(new i = strlen(name); (--i) != -1;)
            {
                if(name[i] == '_') name[i] = ' ';
            }
}
}
else
{
if(!IsPlayerNPC(playerid))
{
name = "Disconnected User";
}
else
{
name = "NPC/ Bot";
}
}
return name;
}*/

stock RespawnEveryone()
{
    for(new i = 0; i < MAX_PLAYERS; i++) {
        SetPlayerHealth(i, 0.0);
    }
}
//UNDER PUBLIC ONGAMEMODEINT()
SetTimer("MapChanger", 100000, false);
    Map = 0;
//and this out of a callback
forward MapChanger();
public MapChanger()
{
    switch(Map) {
        case 0: Map ++, RespawnEveryone(), SendRconCommand("mapname The_Base"), SendRconCommand("hostname Swat 5 (Round 1/2)");
        case 1: Map ++, RespawnEveryone(), SendRconCommand("mapname Medival"), SendRconCommand("hostname Swat 5 (Round 2/2)");
        default: Map = 0, RespawnEveryone(), SendRconCommand("mapname Map Bug");
    }
    return 1;
}
//Public onplayerspawn
if(Map == 1) {
        if(gTeam[playerid] == TEAM_CT) {
            SetPlayerPos(playerid,2533.8667,2753.3320,10.8203);
            SetPlayerFacingAngle(playerid, 90.5278 );
        }
        if(gTeam[playerid] == TEAM_T) {
            SetPlayerPos(playerid,2667.8340,2717.2986,10.8203);
            SetPlayerFacingAngle(playerid, 31.6018);
        }
    }
    else if(Map == 2) {
        if(gTeam[playerid] == TEAM_CT) {
            SetPlayerPos(playerid,1801.1047, -2991.1992, 6.1988);
            SetPlayerFacingAngle(playerid, 183.9618);
        }
        if(gTeam[playerid] == TEAM_T) {
            SetPlayerPos(playerid,1846.0448, -3083.0525, 6.6550);
            SetPlayerFacingAngle( playerid, 44.1783 );
        }
    }
Reply
#5

anyone?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)