Proposal to improve client
#1

Hi All! Sorry for my bad english.
Recently I wanted to for the sake of interest to remove the entire map.
But client is crash.
Code(My Version and Caypen):
PHP код:
forward RemoveTheMapForPlayer(playerid);
public 
RemoveTheMapForPlayer(playerid)
{
    new 
x= -4000,y = -4000,z = -250, modelid = 0;
    while(
modelid < 10)
    {
        
RemoveBuildingForPlayer(playerid, modelid, x, y, z,20.0);
        if(
y <= 4000) {y++;}
        if( 
y > 4000) { x ++; y= -4000;}
        if( 
x > 4000) {z++; x=-4000; y= -4000;}
        if( 
z > 1500) {z = -250; x=-4000; y= -4000;modelid++;}
        if(
modelid > 20000) {break;}
    }
    return 
true;
}
public 
OnPlayerSpawn(playerid)
{
    
SetTimerEx("RemoveTheMapForPlayer", 10000, 0, "d", playerid);
    return 
1;
} 
Code(Version by Caypen):
He remove 10000 objects
PHP код:
new DelMap;
/*x= -4000,y = -4000,z = -250,*/
forward RemoveTheMapForPlayer(playerid);
public 
RemoveTheMapForPlayer(playerid)
{
    if(!
IsPlayerConnected(playerid)){DelMap =0; return true;}
    switch(
DelMap)
    {
    case 
0:
        {
            new 
modelid = 0;
            while(
modelid < 2000)
            {
                
RemoveBuildingForPlayer(playerid, modelid, 0.0, 0.0, 0.0,8000.0);
                
modelid ++;
                
/*if(y <= 4000) {y++;}
                if( y > 4000) { x ++; y= -4000;}
                if( x > 4000) {z++; x=-4000; y= -4000;}
                if( z > 1500) {z = -250; x=-4000; y= -4000;modelid++;}*/
                
if(modelid > 2000) {break;}
            }
            
DelMap = 1;
            
SetTimerEx("RemoveTheMapForPlayer", 5000, 0, "d", playerid);
            return 
true;
        }
    case 
1:
        {
            new 
modelid = 2000;
            while(
modelid < 4000)
            {
                
RemoveBuildingForPlayer(playerid, modelid, 0.0, 0.0, 0.0,8000.0);
                
modelid ++;
                
/*if(y <= 4000) {y++;}
                if( y > 4000) { x ++; y= -4000;}
                if( x > 4000) {z++; x=-4000; y= -4000;}
                if( z > 1500) {z = -250; x=-4000; y= -4000;modelid++;}*/
                
if(modelid > 4000) {break;}
            }
            
DelMap = 2;
            
SetTimerEx("RemoveTheMapForPlayer", 5000, 0, "d", playerid);
            return 
true;
        }
    case 
2:
        {
            new 
modelid = 4000;
            while(
modelid < 6000)
            {
                
RemoveBuildingForPlayer(playerid, modelid, 0.0, 0.0, 0.0,8000.0);
                
modelid ++;
                
/*if(y <= 4000) {y++;}
                if( y > 4000) { x ++; y= -4000;}
                if( x > 4000) {z++; x=-4000; y= -4000;}
                if( z > 1500) {z = -250; x=-4000; y= -4000;modelid++;}*/
                
if(modelid > 6000) {break;}
            }
            
DelMap = 3;
            
SetTimerEx("RemoveTheMapForPlayer", 5000, 0, "d", playerid);
            return 
true;
        }
    case 
3:
        {
            new 
modelid = 6000;
            while(
modelid < 7000)
            {
                
RemoveBuildingForPlayer(playerid, modelid, 0.0, 0.0, 0.0,8000.0);
                
modelid ++;
                    
/*if(y <= 4000) {y++;}
                    if( y > 4000) { x ++; y= -4000;}
                    if( x > 4000) {z++; x=-4000; y= -4000;}
                    if( z > 1500) {z = -250; x=-4000; y= -4000;modelid++;}*/
                
if(modelid > 7000) {break;}
            }
            
DelMap = 4;
            
SetTimerEx("RemoveTheMapForPlayer", 5000, 0, "d", playerid);
            return 
true;
        }
    case 
4:
        {
            new 
modelid = 7000;
            while(
modelid < 7002)
            {
                
modelid ++;
                
RemoveBuildingForPlayer(playerid, modelid, 0.0, 0.0, 0.0,8000.0);
                
modelid ++;
                
/*if(y <= 4000) {y++;}
                if( y > 4000) { x ++; y= -4000;}
                if( x > 4000) {z++; x=-4000; y= -4000;}
                if( z > 1500) {z = -250; x=-4000; y= -4000;modelid++;}*/
                
if(modelid > 7002) {break;}
            }
            
DelMap = 5;
            
SetTimerEx("RemoveTheMapForPlayer", 5000, 0, "d", playerid);
            return 
true;
        }
    case 
5:
        {
            new 
modelid = 8000;
            while(
modelid < 9000)
            {
                
RemoveBuildingForPlayer(playerid, modelid, 0.0, 0.0, 0.0,8000.0);
                
modelid ++;
                
/*if(y <= 4000) {y++;}
                if( y > 4000) { x ++; y= -4000;}
                if( x > 4000) {z++; x=-4000; y= -4000;}
                if( z > 1500) {z = -250; x=-4000; y= -4000;modelid++;}*/
                
if(modelid > 9000) {break;}
            }
            
DelMap = 6;
            
SetTimerEx("RemoveTheMapForPlayer", 5000, 0, "d", playerid);
            return 
true;
        }
    case 
6:
        {
            new 
modelid = 9000;
            while(
modelid < 11000)
            {
                
RemoveBuildingForPlayer(playerid, modelid, 0.0, 0.0, 0.0,8000.0);
                
modelid ++;
                
/*if(y <= 4000) {y++;}
                if( y > 4000) { x ++; y= -4000;}
                if( x > 4000) {z++; x=-4000; y= -4000;}
                if( z > 1500) {z = -250; x=-4000; y= -4000;modelid++;}*/
                
if(modelid > 11000) {break;}
            }
            
DelMap = 7;
            
SetTimerEx("RemoveTheMapForPlayer", 5000, 0, "d", playerid);
            return 
true;
        }
    case 
7:
        {
            new 
modelid = 11000;
            while(
modelid < 12000)
            {
                
RemoveBuildingForPlayer(playerid, modelid, 0.0, 0.0, 0.0,8000.0);
                
modelid ++;
                
/*if(y <= 4000) {y++;}
                if( y > 4000) { x ++; y= -4000;}
                if( x > 4000) {z++; x=-4000; y= -4000;}
                if( z > 1500) {z = -250; x=-4000; y= -4000;modelid++;}*/
                
if(modelid > 12000) {break;}
            }
            
DelMap = 8;
            
SetTimerEx("RemoveTheMapForPlayer", 5000, 0, "d", playerid);
            return 
true;
        }
    case 
8:
        {
            new 
modelid = 12000;
            while(
modelid < 14000)
            {
                
RemoveBuildingForPlayer(playerid, modelid, 0.0, 0.0, 0.0,8000.0);
                
modelid ++;
                
/*if(y <= 4000) {y++;}
                if( y > 4000) { x ++; y= -4000;}
                if( x > 4000) {z++; x=-4000; y= -4000;}
                if( z > 1500) {z = -250; x=-4000; y= -4000;modelid++;}*/
                
if(modelid > 14000) {break;}
            }
            
DelMap = 9;
            
SetTimerEx("RemoveTheMapForPlayer", 5000, 0, "d", playerid);
            return 
true;
        }
    case 
9:
        {
            new 
modelid = 14000;
            while(
modelid < 15000)
            {
                
RemoveBuildingForPlayer(playerid, modelid, 0.0, 0.0, 0.0,8000.0);
                
modelid ++;
                
/*if(y <= 4000) {y++;}
                if( y > 4000) { x ++; y= -4000;}
                if( x > 4000) {z++; x=-4000; y= -4000;}
                if( z > 1500) {z = -250; x=-4000; y= -4000;modelid++;}*/
                
if(modelid > 15000) {break;}
            }
            
DelMap = 10;
            
SetTimerEx("RemoveTheMapForPlayer", 5000, 0, "d", playerid);
            return 
true;
        }
    case 
10:
        {
            new 
modelid = 15000;
            while(
modelid < 17000)
            {
                
RemoveBuildingForPlayer(playerid, modelid, 0.0, 0.0, 0.0,8000.0);
                
modelid ++;
                
/*if(y <= 4000) {y++;}
                if( y > 4000) { x ++; y= -4000;}
                if( x > 4000) {z++; x=-4000; y= -4000;}
                if( z > 1500) {z = -250; x=-4000; y= -4000;modelid++;}*/
                
if(modelid > 17000) {break;}
            }
            
DelMap = 11;
            
SetTimerEx("RemoveTheMapForPlayer", 5000, 0, "d", playerid);
            return 
true;
        }
    case 
11:
        {
            new 
modelid = 17000;
            while(
modelid < 18000)
            {
                
RemoveBuildingForPlayer(playerid, modelid, 0.0, 0.0, 0.0,8000.0);
                
modelid ++;
                
/*if(y <= 4000) {y++;}
                if( y > 4000) { x ++; y= -4000;}
                if( x > 4000) {z++; x=-4000; y= -4000;}
                if( z > 1500) {z = -250; x=-4000; y= -4000;modelid++;}*/
                
if(modelid > 18000) {break;}
            }
            
DelMap = 12;
            
SetTimerEx("RemoveTheMapForPlayer", 5000, 0, "d", playerid);
            return 
true;
        }
    case 
12:
        {
            new 
modelid = 18000;
            while(
modelid < 20000)
            {
                
RemoveBuildingForPlayer(playerid, modelid, 0.0, 0.0, 0.0,8000.0);
                
modelid ++;
                
/*if(y <= 4000) {y++;}
                if( y > 4000) { x ++; y= -4000;}
                if( x > 4000) {z++; x=-4000; y= -4000;}
                if( z > 1500) {z = -250; x=-4000; y= -4000;modelid++;}*/
                
if(modelid > 20000) {break;}
            }
            
DelMap = -1;
            return 
true;
        }
    }
    return 
true;
} 
But all objects uninstall did not work.
Cool idea xD
Please update to client for that.
It is possible?
Reply
#2

I asked this question quite a while ago. Check
****** came with a good answer
I know this is a proposal, but I still thought it would be good for you to see some elaboration on the 'remove entire map' idea.
Reply
#3

I did everything. But client is crash.
Reply
#4

That was the point made in the thread I linked you to. ******' answer tells you why it crashes.
Reply
#5

Tried such a thing before, does not work.
Probably since it is too much to handle for the client. Otherwise you will have to do it in a slow matter.
Reply
#6

I don't believe this would be a 'improvement'. I think this would ruin the idea of the SA:MP Modification. SA:MP was created for a multiplayer purpose modification for other people to play together. On the GTA:SA mapping, not for someone to completely remove the map.
Reply
#7

Keep dreaming, let me sing you a lullaby.

[ame]http://www.youtube.com/watch?v=vU0fYzuypXg[/ame]
Reply
#8

Quote:
Originally Posted by [uL]Pottus
Посмотреть сообщение
Keep dreaming, let me sing you a lullaby.

http://www.youtube.com/watch?v=vU0fYzuypXg
Hahahahaha,you made my night.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)