SA-MP Forums Archive
Server crashing rep+ fast - 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: Server crashing rep+ fast (/showthread.php?tid=576062)



Server crashing rep+ fast - Mijata - 31.05.2015

when player use pickup server got crashed help fast rep+

Код:
forward StealAgain();
public StealAgain()
{
Jetpack = CreatePickup(370,1,268.7132,1883.5077,-30.0938,-1);
return 1;
}
Код:
Jetpack = CreatePickup(370,1,268.7132,1883.5077,-30.0938,-1);
Код:
 if(pickupid == Jetpack)
        {
            if(gTeam[playerid] == C1) return 0;
            else
            {
                SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USEJETPACK);
                SendClientMessage(playerid,-1,"{FF0000}[JETPACK]{ffffff}You stole the jetpack, quickly take it to the place on the map.");
                DestroyPickup(Jetpack);
                SetTimer("StealAgain",1200000,false);
                SetPlayerMapIcon(playerid,Ammu,-396.3205,2236.0513,42.4297,20,0,MAPICON_GLOBAL);
                GameTextForAll("~b~Cops ~N~~W~intruder stole the ~N~~R~jetpack~W~ ~N~stop him immediately!");
                for(new i=0; i <MAX_PLAYERS; i++)
                {
                {

                                }
                        }
            }
		}

  return 1;
}



Re: Server crashing rep+ fast - J0sh... - 31.05.2015

PHP код:
                for(new i=0<MAX_PLAYERSi++)
                {
                {

                                }
                        }
            }
        } 
What is that?


Re: Server crashing rep+ fast - Mijata - 31.05.2015

need to remove ??

Код:
for(new i=0; i <MAX_PLAYERS; i++)



Re: Server crashing rep+ fast - Mijata - 31.05.2015

bump


Re: Server crashing rep+ fast - Stev - 31.05.2015

Your looping nothing. That's probably why its crashing.


Re: Server crashing rep+ fast - Mijata - 01.06.2015

can't understand


Re: Server crashing rep+ fast - Pizzy - 01.06.2015

Delete that:

Код:
                for(new i=0; i <MAX_PLAYERS; i++)
                {
                {

                                }
                        }
And why was it even in there in the first place? That's what's confusing people.


Re: Server crashing rep+ fast - hamzajaved780 - 01.06.2015

Use this:

Код:
        if(pickupid == Jetpack)
        {
            if(gTeam[playerid] == C1) return 0;
            else
            {
                SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USEJETPACK);
                SendClientMessage(playerid,-1,"{FF0000}[JETPACK]{ffffff}You stole the jetpack, quickly take it to the place on the map.");
                DestroyPickup(Jetpack);
                SetTimer("StealAgain",1200000,false);
                SetPlayerMapIcon(playerid,Ammu,-396.3205,2236.0513,42.4297,20,0,MAPICON_GLOBAL);
                GameTextForAll("~b~Cops ~N~~W~intruder stole the ~N~~R~jetpack~W~ ~N~stop him immediately!");                
                return 1;
        }



Re: Server crashing rep+ fast - SoFahim - 01.06.2015

It might be helpful for you.
PHP код:
 if(pickupid == Jetpack)
        {
            if(
gTeam[playerid] == C1) return 0;
            else
            {
                
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USEJETPACK);
                
SendClientMessage(playerid,-1,"{FF0000}[JETPACK]{ffffff}You stole the jetpack, quickly take it to the place on the map.");
                
DestroyPickup(Jetpack);
                
SetTimer("StealAgain",1200000,false);
                
SetPlayerMapIcon(playerid,Ammu,-396.3205,2236.0513,42.4297,20,0,MAPICON_GLOBAL);
                
GameTextForAll("~b~Cops ~N~~W~intruder stole the ~N~~R~jetpack~W~ ~N~stop him immediately!");
                for(new 
i=0<MAX_PLAYERSi++)
               
        }

  return 
1;




Re: Server crashing rep+ fast - Mijata - 01.06.2015

Quote:
Originally Posted by SoFahim
Посмотреть сообщение
It might be helpful for you.
PHP код:
 if(pickupid == Jetpack)
        {
            if(
gTeam[playerid] == C1) return 0;
            else
            {
                
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USEJETPACK);
                
SendClientMessage(playerid,-1,"{FF0000}[JETPACK]{ffffff}You stole the jetpack, quickly take it to the place on the map.");
                
DestroyPickup(Jetpack);
                
SetTimer("StealAgain",1200000,false);
                
SetPlayerMapIcon(playerid,Ammu,-396.3205,2236.0513,42.4297,20,0,MAPICON_GLOBAL);
                
GameTextForAll("~b~Cops ~N~~W~intruder stole the ~N~~R~jetpack~W~ ~N~stop him immediately!");
                for(new 
i=0<MAX_PLAYERSi++)
               
        }
  return 
1;

Quote:
Originally Posted by hamzajaved780
Посмотреть сообщение
Use this:

Код:
        if(pickupid == Jetpack)
        {
            if(gTeam[playerid] == C1) return 0;
            else
            {
                SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USEJETPACK);
                SendClientMessage(playerid,-1,"{FF0000}[JETPACK]{ffffff}You stole the jetpack, quickly take it to the place on the map.");
                DestroyPickup(Jetpack);
                SetTimer("StealAgain",1200000,false);
                SetPlayerMapIcon(playerid,Ammu,-396.3205,2236.0513,42.4297,20,0,MAPICON_GLOBAL);
                GameTextForAll("~b~Cops ~N~~W~intruder stole the ~N~~R~jetpack~W~ ~N~stop him immediately!");                
                return 1;
        }
can't complite 26 errors