22.06.2011, 17:37
Good Evening, Okay I wouldn't normally post here about things like this, but I thought it was worth mentioning.
I have this command:
The function it uses:
However, it crashes the server?! It seems pretty straight forward and I don't see what could crash it.
I have also tried like this:
This also crashes the server.
I do not see what could be crashing the server.
Also, I know it is this command. I enabled a "crash reporter", to log everything players do (I knew it wasn't in a recurring timer or something, as my test server which is locked; doesn't have this problem - and it doesn't get used that often, if at all)
The crash log has given the same results EVERY time.
They are all on separate occasions.
Has anyone got any ideas, I just don't see what could be at fault.
Thanks,
Ash.
I have this command:
pawn Код:
dcmd_resetvehicles(playerid, params[])
{
HMOD_CHECK;
for(new i; i < MAX_VEHICLES; i++)
{
if(IsVehicleEmpty(i) == 1) SetVehicleToRespawn(i);
}
#pragma unused params
return 1;
}
pawn Код:
stock IsVehicleEmpty(vehicleid)
{
for(new i; i < GetMaxPlayers(); i++)
{
if(GetPlayerVehicleID(i) == vehicleid) return 0;
if(GetVehicleTrailer(GetPlayerVehicleID(i)) == vehicleid) return 0;
}
return 1;
}
I have also tried like this:
pawn Код:
dcmd_resetvehicles(playerid, params[])
{
HMOD_CHECK;
for(new i; i < MAX_VEHICLES; i++)
{
for(new p; p < GetMaxPlayers(); p++)
{
if(GetPlayerVehicleID(p) == i) continue;
if(GetVehicleTrailer(GetPlayerVehicleID(p)) == i) continue;
SetVehicleToRespawn(i);
}
}
return 1;
}
I do not see what could be crashing the server.
Also, I know it is this command. I enabled a "crash reporter", to log everything players do (I knew it wasn't in a recurring timer or something, as my test server which is locked; doesn't have this problem - and it doesn't get used that often, if at all)
The crash log has given the same results EVERY time.
Код:
AleXandeR(2): Called Command: /resetvehicles =# System Crash (HALT) Ash(12): Called Command: /resetvehicles =# System Crash (HALT) Joe(4): Called Command: /resetvehicles =# System Crash (HALT) Slithisthroat(0)Called Command: /resetvehicles =# System Crash (HALT)
Has anyone got any ideas, I just don't see what could be at fault.
Thanks,
Ash.