Problem pickups/gametexts/payday
#3

Код:
		else if(PlayerToPoint(3.0,i,2057.2795,-1907.8834,13.5469))
		{
		    GameTextForPlayer(i, "~w~Tasteaza /getlicense", 5000, 5);
		}
Thats for Gametext.

I cant add my all OnGamemodeInit and public Payday, the forum wont let me.

Here is where the payday supposed to act.

Код:
if(PlayerInfo[i][pPayDay] >= 5)
			{
				/*format(entry, sizeof(entry), "ID %d - Debug 6\n", i);
				fwrite(hFile, entry);*/
			    // Dobanda
				if (key != 255 && !strcmp(playername2, HouseInfo[key][hOwner], true)) tmpintrate = 5;
				else tmpintrate = 3;
				/*format(entry, sizeof(entry), "ID %d - Debug 7\n", i);
				fwrite(hFile, entry);*/
			    checks = PlayerInfo[i][pPayCheck] / 8;
			    ebill = SBizzInfo[7][sbEntranceCost];
				/*format(entry, sizeof(entry), "ID %d - Debug 8\n", i);
				fwrite(hFile, entry);*/
			    TaxValue += TaxPerPlayer;
			    SaveStuff();
			    /*if(ForbbidenTV[i]) { SendClientMessage(i,0x0DFF00FF,"Pentru ca te uitai la TV, nu ti-ai primit salariul !"); continue; }*/
			    ConsumingMoney[i] = true;
			    GivePlayerCash(i, checks);
				/*format(entry, sizeof(entry), "ID %d - Debug 9\n", i);
				fwrite(hFile, entry);*/
			    if(account > 0 && (PlayerInfo[i][pPhousekey] != 255 || PlayerInfo[i][pPbiskey] != 255))
			    { // Daca am bani in banca si (daca am casa sau bizz)
			    	account -= ebill;
			    	SBizzInfo[7][sbTill] += ebill;
				}
				else ebill = 0;
				/*format(entry, sizeof(entry), "ID %d - Debug 10\n", i);
				fwrite(hFile, entry);*/
				if(!IsAFK[i]) interest = (account/1200)*(tmpintrate);
				else interest = 0;

				PlayerInfo[i][pExp]++;
				PlayerPlayMusic(i);
				PlayerInfo[i][pAccount] = account + interest;
				PlayerInfo[i][pAccount] -= TaxPerPlayer;
				/*format(entry, sizeof(entry), "ID %d - Debug 11\n", i);
				fwrite(hFile, entry);*/
				SendClientMessage(i, COLOR_WHITE, "|___ STATUT BANCAR ___|");
				format(string, sizeof(string), "  Salariu: $%s   Taxe: -$%s", GroupDigit(checks), GroupDigit(TaxPerPlayer));
				SendClientMessage(i, COLOR_GRAD1, string);
				if(PlayerInfo[i][pPhousekey] != 255 || PlayerInfo[i][pPbiskey] != 255)
				{
				    format(string, sizeof(string), "  Factura electricitate: -$%s", GroupDigit(ebill));
					SendClientMessage(i, COLOR_GRAD1, string);
				}
				/*format(entry, sizeof(entry), "ID %d - Debug 12\n", i);
				fwrite(hFile, entry);*/
				format(string, sizeof(string), "  Balanta: $%s", GroupDigit(mylastmoney));
				SendClientMessage(i, COLOR_GRAD1, string);
				switch(tmpintrate)
				{
				    case 3:	SendClientMessage(i, COLOR_GRAD2, "  Dobanda: 0.3 %%");
				    case 5: SendClientMessage(i, COLOR_GRAD2, "  Dobanda: 0.5 %%");
				}
				format(string, sizeof(string), "  Dobanda primita: $%s", GroupDigit(interest));
				SendClientMessage(i, COLOR_GRAD3, string);
				SendClientMessage(i, COLOR_GRAD4, "|--------------------------------------|");
				format(string, sizeof(string), "  Balanta noua: $%s", GroupDigit(PlayerInfo[i][pAccount]));
				SendClientMessage(i, COLOR_GRAD5, string);
				/*format(entry, sizeof(entry), "ID %d - Debug 13\n", i);
				fwrite(hFile, entry);*/
				if(chirie)
				{
					format(string, sizeof(string), "  Chirie: -$%s ( %s )", GroupDigit(rent),de_unde);
					SendClientMessage(i, COLOR_GRAD5, string);
				}
				if(afara)
				{
					format(string,sizeof(string),"Pentru ca nu ai suficienti bani ( $%s ) , ai fost dat afara din casa lui %s.",GroupDigit(afara),HouseInfo[key][hOwner]);
					SendClientMessage(i, 0x96AC53FF, string);
				}
				GameTextForPlayer(i, "~y~~h~Ziua Platii~n~~w~~h~Salariul", 5000, 1);
				/*format(entry, sizeof(entry), "ID %d - Debug 14\n", i);
				fwrite(hFile, entry);*/
				PlayerInfo[i][pPayDay] = 0;
				PlayerInfo[i][pPayCheck] = 0;
				if(!IsAFK[i])
				{
					PlayerInfo[i][pConnectTime] += 1;
				}
				else
				{
				    PlayerInfo[i][pAFKTime] += 1;
				}
And here is a Pickup

Код:
AddStaticPickup(1239,1, 246.9308,1930.5734,17.6481);
The strange part is that, those pick-ups are working:

Код:
		if(HouseInfo[h][hOwned] == 0)
		{
			AddStaticPickup(1273, 1, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]/*,ALL_VIRTUAL_WORLDS*/);
			/*format(string,sizeof(string),"[ID: %d]\nAceasta casa este de vanzare\n\tPret: %s$",h,GroupDigit(HouseInfo[h][hBuyPrice]));
			HouseLabel[h] = Create3DTextLabel(string,0xE64F4FAA, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez], 25.0, 0, 1);*/
		}

Btw, this may be a problem?

[20:10:11] Loaded.
[20:10:11] Loading plugin: profiler.so
[20:10:11] Failed (/usr/lib32/libstdc++.so.6: version `CXXABI_1.3.5' not found (required by plugins/profiler.so))
[20:10:11] Loading plugin: streamer.so
[20:10:11]

*** Streamer Plugin v2.6.1 by Incognito loaded ***

[20:10:11] Loaded.
[20:10:11] Loaded 2 plugins.

I dont acctually know what is for profiler.so so..

EDIT about profiler: i understand now how can you use it, but still, dont think that he is the problem.

EDIT2: Ok, i have another ideea. The gamemode i run isnt mine but was ok first time when i tested. So, i saved the original .pwn. I compiled it and run on the server. I have the same problems. This may be from MYSQL? Or its from gamemode?
Reply


Messages In This Thread
Problem pickups/gametexts/payday - by abyss. - 18.02.2015, 12:49
Re: Problem pickups/gametexts/payday - by CalvinC - 18.02.2015, 13:02
Re: Problem pickups/gametexts/payday - by abyss. - 18.02.2015, 17:14
Re: Problem pickups/gametexts/payday - by abyss. - 18.02.2015, 23:35
Re: Problem pickups/gametexts/payday - by abyss. - 19.02.2015, 13:18
Re: Problem pickups/gametexts/payday - by abyss. - 19.02.2015, 14:04
Re: Problem pickups/gametexts/payday - by abyss. - 19.02.2015, 20:29
Re: Problem pickups/gametexts/payday - by abyss. - 20.02.2015, 15:37
Re: Problem pickups/gametexts/payday - by abyss. - 21.02.2015, 07:22

Forum Jump:


Users browsing this thread: 3 Guest(s)