SA-MP Forums Archive
Problem HELP - 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: Problem HELP (/showthread.php?tid=468707)



Problem HELP - cuemur - 09.10.2013

for() - isn't working anymore because we changed from Debian to linux ,please help !!


PHP Code:
    for(new i=0i<=GetMaxPlayers(); i++)
    { 
some commands and timers isn't working like it should

what would be the reason


PHP Code:
CMD:saveall(playeridparams[])
{
    if(
PlayerLogged[playerid] == 0) return 1;
    if(
PlayerInfo[playerid][pAdmin] < 1337 || AdminLogged[playerid] == false) return 1;
    for(new 
i=0i<=GetMaxPlayers(); i++)
    {
    
SaveAccount(i);
    
SaveVehicle(i);
    }
    
SaveOther();
    
SendClientMessage(playeridCOLOR_LIGHTRED"Speletaju dati tika saglabati!");
    return 
1;

PHP Code:
CMD:restart(playeridparams[])
{
    if(
PlayerLogged[playerid] == 0) return 1;
    if(
PlayerInfo[playerid][pAdmin] != 1337 || AdminLogged[playerid] == false) return 1;
    for(new 
0<= 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;

when these commands used nothing happens ;// when we used debian they worked right...


Re: Problem HELP - cuemur - 09.10.2013

Please +REP ;/