09.10.2013, 21:48
for() - isn't working anymore because we changed from Debian to linux ,please help !!
some commands and timers isn't working like it should
what would be the reason
when these commands used nothing happens ;// when we used debian they worked right...
PHP Code:
for(new i=0; i<=GetMaxPlayers(); i++)
{
what would be the reason
PHP Code:
CMD:saveall(playerid, params[])
{
if(PlayerLogged[playerid] == 0) return 1;
if(PlayerInfo[playerid][pAdmin] < 1337 || AdminLogged[playerid] == false) return 1;
for(new i=0; i<=GetMaxPlayers(); i++)
{
SaveAccount(i);
SaveVehicle(i);
}
SaveOther();
SendClientMessage(playerid, COLOR_LIGHTRED, "Speletaju dati tika saglabati!");
return 1;
}
PHP Code:
CMD:restart(playerid, params[])
{
if(PlayerLogged[playerid] == 0) return 1;
if(PlayerInfo[playerid][pAdmin] != 1337 || AdminLogged[playerid] == false) return 1;
for(new i = 0; i <= GetMaxPlayers(); i++)
{
SaveAccount(i);
if(GetPVarInt(i,"CREATEVEH") > 0)
{
DestroyVehicle(GetPVarInt(i,"CREATEVEH"));
DeletePVar(i,"CREATEVEH");
}
if(GetPVarInt(i,"CREVEH") > 0)
{
SaveVehicle(i);
DestroyVehicle(GetPVarInt(i,"CREVEH"));
DeletePVar(i,"CREVEH");
}
}
SaveOther();
GameTextForAll("~r~Restarting the Server!",12000,0);
SendClientMessageToAll(COLOR_RED, "Servera Restarts!");
forEx(sizeof FerrisWheelObjects,x)DestroyObject(FerrisWheelObjects[x]);
SetTimer("MysqlUnload",10000,0);
//SetTimer("ServerRR",15000,0);
return 1;
}