crashdetact plugins Please Help Me
#1

Код:
[23:00:02] [debug] #12 0804b4c1 in __gxx_personality_v0 () from ./samp03svr
[23:00:02] [debug] #11 00882eac in __libc_start_main () from /lib/libc.so.6
[23:00:02] [debug] #10 08077c23 in ?? () from ./samp03svr
[23:00:02] [debug] #9  0807da9b in ?? () from ./samp03svr
[23:00:02] [debug] #8  080dcda5 in ?? () from ./samp03svr
[23:00:02] [debug] #7  f7d83b6e in ?? () from plugins/crashdetect.so
[23:00:02] [debug] #6  f7d7cb2b in crashdetect::HandleAmxExec () from plugins/crashdetect.so
[23:00:02] [debug] #5  f7d86db6 in amx_Exec () from plugins/crashdetect.so
[23:00:02] [debug] #4  080cbade in ?? () from ./samp03svr
[23:00:02] [debug] #3  ffffe500 in ?? ()
[23:00:02] [debug] #2  f7d84d4e in ?? () from plugins/crashdetect.so
[23:00:02] [debug] #1  f7d7fbbc in crashdetect::Crash () from plugins/crashdetect.so
[23:00:02] [debug] #0  f7d7d4ad in crashdetect::PrintNativeBacktrace () from plugins/crashdetect.so


my server shut down why




Another one




Код:
[23:00:02] [debug] #0  001c0a5c in public VehicleRespawn () from Faour.amx
Faour is name my gm

now what is my problem in vehicleresapwn

Код:
forward VehicleRespawn(playerid, vehicleid, ispassenger);
public VehicleRespawn(playerid, vehicleid, ispassenger)
{

    GameTextForPlayer(playerid,"~r~Vehicles ~g~Respawn",5000,5);
    for(new i = 0; i < MAX_VEHICLES; i ++ ) {
         for(new o = 0; o < GetMaxPlayers(); o ++ ) {
              if(!IsPlayerConnected(o)) continue;
              if(IsAnyBodyInVehicle(i)) continue;
              SetVehicleToRespawn(i);
              
         }
    }
    return 1;
}

stock IsAnyBodyInVehicle(vid) {
  for(new i = 0; i < GetMaxPlayers(); i ++ ) {
       if(IsPlayerInVehicle(i, vid)) return 1;
  }
  return 0;
}
Reply
#2

for(new o = 0; o < GetMaxPlayers(); o ++ ) {

This.
Chnage it to
pawn Код:
for(new o = 0, a = GetMaxPlayers(); o < a; o ++ )
Reply
#3

Quote:
Originally Posted by [MG]Dimi
Посмотреть сообщение
for(new o = 0; o < GetMaxPlayers(); o ++ ) {

This.
Chnage it to
pawn Код:
for(new o = 0, a = GetMaxPlayers(); o < a; o ++ )
~Thanks~


Код:
forward VehicleRespawn(playerid, vehicleid, ispassenger);
public VehicleRespawn(playerid, vehicleid, ispassenger)
{

    GameTextForPlayer(playerid,"~r~Vehicles ~g~Respawn",5000,5);
    for(new i = 0; i < MAX_VEHICLES; i ++ ) {
         for(new o = 0, a = GetMaxPlayers(); o < a; o ++ ) { <<<<<<<<<<<<<< im change this 
              if(!IsPlayerConnected(o)) continue;
              if(IsAnyBodyInVehicle(i)) continue;
              SetVehicleToRespawn(i);
              
         }
    }
    return 1;
}

stock IsAnyBodyInVehicle(vid) {
  for(new i = 0; i < GetMaxPlayers(); i ++ ) {  <<<<<<<<<<< this need to change ?
       if(IsPlayerInVehicle(i, vid)) return 1;
  }
  return 0;
}
Reply
#4

Do the same thing ...
Is more optimized
Reply
#5

Quote:
Originally Posted by Viniborn
Посмотреть сообщение
Do the same thing ...
Is more optimized
First way he did crashes my compiler...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)