Code is not functional
#1

Hello! can someone help me please? I studied all day today the code below, the problem is that with this code enabled on the gamemode, nothing below it does not run (I think), it is used in Payday server, and when a person buys a room at the hotel ("PlayerInfo[i][pPhousekey] == -1"), the payday it is not executed, ie does not show your salary and etc .. if it is not a room in the hotel, the public payday, is executed usually .. can someone help me please?

PHP код:
                 new nome[MAX_PLAYER_NAME];
                
GetPlayerName(inomesizeof(nome));
                new 
key PlayerInfo[i][pPhousekey];
                if (
PlayerInfo[i][pPhousekey] != 255)
                {
                    
rent HouseInfo[key][hRent];
                    
//if (PlayerInfo[i][pPhousekey] == -1) rent = 600;
                    
if (strcmp(nomeHouseInfo[key][hOwner], true) == 0rent 0;
                    else if (
account rent)
                    {
                        
PlayerInfo[i][pPhousekey] = 255;
                        
SendClientMessage(i, -1"You have been evicted from hotel / home for not having money to pay");
                        
rent 0;
                    }
                    
HouseInfo[key][hTakings] = HouseInfo[key][hTakings] + rent;
                }
                new 
tmpintrate;
                if (
key != 255 && strcmp(nomeHouseInfo[key][hOwner], true) == 0)
                {
                    if (
PlayerInfo[i][pDonateRank] > 0tmpintrate intrate 4;
                    else 
tmpintrate intrate 2;
                }
                else
                {
                    if (
PlayerInfo[i][pDonateRank] > 0tmpintrate 3;
                    else 
tmpintrate 1;
                } 
Reply
#2

up!!
Reply
#3

You can't expect anyone to seriously post..
You've given code which makes no sense...

You need to post the full code block before you can expect anyone to know what you're trying to do...


Edit::

I Looked at your half cocked code...

and this should work...

PHP код:
                new name[MAX_PLAYER_NAME]; 
                
GetPlayerName(inamesizeof(name)); 
                new 
key PlayerInfo[i][pPhousekey]; 
                if(
PlayerInfo[i][pPhousekey] != 255) { 
                    
rent HouseInfo[key][hRent]; 
                    if(
strcmp(nameHouseInfo[key][hOwner], true) == 0) {
                        
rent 0;
                    } else if(
account rent) { // Changed... As you were saying If their "Account" > GREATER than the rent.. It evicts.. Should be If they have no money Which is < Lower than rent
                        
PlayerInfo[i][pPhousekey] = 255
                        
SendClientMessage(i, -1"You have been evicted from hotel / home for not having money to pay"); 
                        
rent 0
                    } 
                    
HouseInfo[key][hTakings] = HouseInfo[key][hTakings] += rent
                } 
                new 
tmpintrate
                if(
key != 255 && strcmp(nameHouseInfo[key][hOwner], true) == 0) { 
                    if (
PlayerInfo[i][pDonateRank] > 0) {
                        
tmpintrate intrate += 4;
                    } else {
                        
tmpintrate intrate += 2;
                    }
                }  else { 
                    if (
PlayerInfo[i][pDonateRank] > 0) {
                        
tmpintrate 3;
                    } else {
                        
tmpintrate 1;
                    }
                } 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)