Not receiving PayDay
#1

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
Reply
#2

Someone?
Reply
#3

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.
Reply
#4

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.
Reply
#5

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( ); 
Reply
#6

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" 
Reply
#7

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
Reply
#8

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

Debug SaveGangZones same way
Reply
#10

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;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)