SA-MP Forums Archive
Not receiving PayDay - 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: Not receiving PayDay (/showthread.php?tid=651920)



Not receiving PayDay - Mill - 30.03.2018

Hi SA-MP Forum users!
I encountered a big problem, which players can't play on my server, it's literally uplayable(because roleplay).
The problem is, players cant receive payday, when 1 hour is past.
When i type '/payday' as an administrator, the chatbox shows 'Unknow command', and whenever i try to save stats or restart my server with commands, where 'SaveAllInformation' is placed, it shows the same.
Can someone help me with this? I will share the code on pastebin ->
https://pastebin.com/2vYZ5H6D


Re: Not receiving PayDay - Mill - 31.03.2018

Someone?


Re: Not receiving PayDay - FaLLenGirL - 31.03.2018

First add "#include zcmd" to your includes.
Use Zeex command processor because it is very easy and it is very accurate.
Check this: https://sampforum.blast.hk/showthread.php?tid=91354

After you add the include please delete your commands "/restart" and "/saveall" from public "OnPlayerCommandText" and add this commands that i will paste you here somewhere in the gamemode, at the end or in another place:

PHP код:
CMD:restartplayeridparams[ ] )
{
    if( 
PlayerInfoplayerid ][ pAdmin ] < )
        return 
MSG_NOADMIN3playerid );
        
    if( 
ServerRestarted ) return SendClientMessageplayeridCOLOR_GREEN"Restarteљana jau notiek !" );
    
SendClientMessageToAllCOLOR_RED"Serveris RESTARTESIES pec 5 sekundem !" );
    
    for( new 
0GetMaxPlayers( ); ++ )
    {
        if( 
IsPlayerConnected) )
        {
            
SavePlayerAccaunt);
        }
    }
    
    
SaveAllInformation( );
    
ServerRestarted true;
    
SetTimer"OnGameModeExit"5000false );
    
    return 
1;
}
CMD:saveallplayeridparams[ ] )
{
    if( 
PlayerInfoplayerid ][ pAdmin ] < )
        return 
MSG_NOADMIN2playerid );
        
    
SendClientMessageplayeridCOLOR_WHITE"Visa servera Informacija saglabata !" );
    for( new 
0GetMaxPlayers( ); ++ )
    {
        if( 
IsPlayerConnected) )
        {
            
SavePlayerAccaunt);
        }
    }
    
SaveAllInformation( );
    
    return 
1;

Please test the commands with the Zeex Command Processor and then please come here with a reply
and tell me if this worked, if don't work, change the "stock GivePlayersPayDay( bool: payed )" with
"public GivePlayersPayDay( bool: payed )" and don't forget to add the forward
"forward GivePlayersPayDay( bool: payed );" before the public.


Re: Not receiving PayDay - Mill - 31.03.2018

Commands are all fine. It doesnt need zcmd, because SaveAllInformation is the error for the code.
I removed the SaveAllInformation from GivePlayersPayDay, then it worked.
I guess SaveAllInformation(); is the error.


Re: Not receiving PayDay - FaLLenGirL - 31.03.2018

Try:

PHP код:
function SaveAllInformation( )
{
    
SaveTuning( );
    
SaveHouses( );
    
SaveGangZones( );
    
SaveFraction( );
    
SaveBusiness( );
    
SaveInforamtion( );
    
SaveVehicles( );
    
    return 
1;

If it doesn't work use your functions instead the "SaveAllInformation".
PHP код:
SaveTuning( );
SaveHouses( );
SaveGangZones( );
SaveFraction( );
SaveBusiness( );
SaveInforamtion( );
SaveVehicles( ); 



Re: Not receiving PayDay - Mill - 31.03.2018

What do u mean?
PHP код:
C:\Users\Lietot&#257;js\Desktop\GAPS\GM\LS-RP\gamemodes\tactic.pwn(11293) : error 017: undefined symbol "SaveAllInformation"
C:\Users\Lietot&#257;js\Desktop\GAPS\GM\LS-RP\gamemodes\tactic.pwn(11303) : error 017: undefined symbol "SaveAllInformation"
C:\Users\Lietot&#257;js\Desktop\GAPS\GM\LS-RP\gamemodes\tactic.pwn(24899) : error 017: undefined symbol "SaveAllInformation"
C:\Users\Lietot&#257;js\Desktop\GAPS\GM\LS-RP\gamemodes\tactic.pwn(25189) : error 017: undefined symbol "SaveAllInformation"
C:\Users\Lietot&#257;js\Desktop\GAPS\GM\LS-RP\gamemodes\tactic.pwn(26002) : error 010: invalid function or declaration
C:\Users\Lietot&#257;js\Desktop\GAPS\GM\LS-RP\gamemodes\tactic.pwn(26012) : error 010: invalid function or declaration
C:\Users\Lietot&#257;js\Desktop\GAPS\GM\LS-RP\gamemodes\tactic.pwn(27170) : error 017: undefined symbol "SaveAllInformation" 



Re: Not receiving PayDay - MadeMan - 31.03.2018

You need to debug which of these functions are failing:
pawn Код:
stock SaveAllInformation()
{
    SaveTuning();
    SaveHouses();
    SaveGangZones();
    SaveFraction();
    SaveBusiness();
    SaveInforamtion();
    SaveVehicles();
}
Remove all of them and then add only SaveTuning. See if it works, then add SaveHouses etc


Re: Not receiving PayDay - Mill - 31.03.2018

Okay, found it
Its SaveGangZones();
What now?


Re: Not receiving PayDay - MadeMan - 31.03.2018

Debug SaveGangZones same way


Re: Not receiving PayDay - Mill - 31.03.2018

U mean what?
PHP код:
stock SaveGangZones()
{
    new 
src[1024];
    for(new 
1<= MAX_GANGZONEi++)
    {
        
format(query,sizeof(query),"UPDATE `"TABLE_GANGZONE"` SET ");
        
format(src,sizeof(src),"fraction=%d",GangZoneInfo[i][gzGang]);
        
strcat(query,src,sizeof(query));
        
        
format(src,sizeof(src)," WHERE id=%d",GangZoneInfo[i][gzID]);
        
strcat(query,src,sizeof(query));
        
mysql_query(query);    
    }
    return 
1;