SA-MP Forums

Go Back   SA-MP Forums > SA-MP Server > Server Support

Reply
 
Thread Tools Display Modes
Old 27/03/2014, 10:45 AM   #1
SiraBots
Big Clucker
 
SiraBots's Avatar
 
Join Date: Jun 2012
Posts: 85
Reputation: 10
Default Delete this thread.

Delete this thread.
__________________
https://github.com/sirajuddin97

Last edited by SiraBots; 23/06/2016 at 11:44 AM.
SiraBots is offline   Reply With Quote
Old 27/03/2014, 01:03 PM   #2
SiraBots
Big Clucker
 
SiraBots's Avatar
 
Join Date: Jun 2012
Posts: 85
Reputation: 10
Default Re: Stuck on "Connected. Joining the game..."

I have tried three different hosts now, two different Linux VPSs and Volt Host. All three doesn't work, I get the same thing. So this means there's something wrong with my script that makes this wrong. What can it be?
__________________
https://github.com/sirajuddin97
SiraBots is offline   Reply With Quote
Old 27/03/2014, 01:51 PM   #3
ikbenremco
Huge Clucker
 
Join Date: Dec 2010
Posts: 379
Reputation: 21
Default Re: Stuck on "Connected. Joining the game..."

Show us that 'payday' code
ikbenremco is offline   Reply With Quote
Old 27/03/2014, 03:09 PM   #4
Ha$H_Sexyboy
Huge Clucker
 
Ha$H_Sexyboy's Avatar
 
Join Date: Nov 2011
Location: Currently in SA
Posts: 364
Reputation: 37
Default Re: Stuck on "Connected. Joining the game..."

It is a loop in your script i had this before or if you're sure that nothing is wrong with your scripts it is a BOT ATTACK it does that 2
__________________
Ha$H_Sexyboy is offline   Reply With Quote
Old 27/03/2014, 04:11 PM   #5
SiraBots
Big Clucker
 
SiraBots's Avatar
 
Join Date: Jun 2012
Posts: 85
Reputation: 10
Default Re: Stuck on "Connected. Joining the game..."

Here's everything related to 'payday' in my script:

Code:
public OnGameModeInit()
{
     SetTimer_("IsPayday", 500, 1000, -1);
}

Code:
forward IsPayday();
public IsPayday()
{
	new hour,mxn,sec;
	gettime(hour, mxn, sec);
	if(sec == 00 && mxn == 00)
	{
		print("Payday");
	    foreach(new i : Player)
	    {
	        if(Logged[i] && cInfo[i][cFirstLogin] <= 0 && Tutorial[i] <= 0) Call_Payday(i);
	    }
	}
	return 1;
}
Code:
stock Call_Payday(playerid)
{
	new rentprice = hInfo[cInfo[playerid][cRenting]][RentPrice];
	new Float:calculateSavings = cInfo[playerid][cSavings]*1.005;
	new calculatedSavings = floatround(calculateSavings, floatround_round);
	new Float:calculateBank = cInfo[playerid][cBank]*1.002;
	new calculatedBank = floatround(calculateBank, floatround_round);
	new calculatePaycheck;
	if(cInfo[playerid][cFaction] > 0) calculatePaycheck = (cInfo[playerid][cRank] * 250) + RandomEx(1500, 1750);
	else calculatePaycheck = RandomEx(1000, 1100) + cInfo[playerid][cPaycheck];
	CPF(playerid, 0x33AA33FF, "_________ PAYDAY INCOME _________");
	CPF(playerid, COLOR_FADE1, "Interest Gained: 0.2");
	if(cInfo[playerid][cSavings] > 0) CPF(playerid, COLOR_FADE1, "Savings Gained: 0.5");
	CPF(playerid, COLOR_FADE1, "Paycheck: $%d", calculatePaycheck);
	if(cInfo[playerid][cRenting] > 0 && cInfo[playerid][cBank] >= rentprice) CPF(playerid, COLOR_RED, "Rent: -$%d", rentprice);
	else if(cInfo[playerid][cRenting] > 0 && cInfo[playerid][cBank] < rentprice) cInfo[playerid][cRenting] = 0, CPF(playerid, COLOR_RED, "You have been evicted from your rented house due to lack of payment.");
	CPF(playerid, COLOR_FADE1, "------------------------");
	CPF(playerid, COLOR_FADE1, "Old Balance: $%d", cInfo[playerid][cBank]);
	CPF(playerid, COLOR_FADE1, "New Balance: $%d", calculatedBank + calculatePaycheck);
	CPF(playerid, COLOR_FADE1, "------------------------");
	if(cInfo[playerid][cSavings] > 0)
	{
		CPF(playerid, COLOR_FADE1, "Old Savings Balance: $%d", cInfo[playerid][cSavings]);
		CPF(playerid, COLOR_FADE1, "New Savings Balance: $%d", calculatedSavings);
	}
	format(gString, sizeof(gString), "~w~Paycheck~n~~g~+$%d", calculatePaycheck);
	GameTextForPlayer(playerid, gString, 3200, 1);
	if(cInfo[playerid][cRenting] > 0 && cInfo[playerid][cBank] >= rentprice) cInfo[playerid][cBank] = calculatedBank + calculatePaycheck - rentprice;
	else cInfo[playerid][cBank] = calculatedBank + calculatePaycheck;
	if(cInfo[playerid][cSavings] >= 20000000) cInfo[playerid][cSavings] = 20000000;
	else if(cInfo[playerid][cSavings] > 0) cInfo[playerid][cSavings] = calculatedSavings;
	new nxtlevel = cInfo[playerid][cLevel]+1;
	new expamount = nxtlevel*4;
	cInfo[playerid][cEXP] += 1;
	if(cInfo[playerid][cEXP] >= expamount)
	{
	    cInfo[playerid][cLevel] += 1;
	    cInfo[playerid][cEXP] = 0;
	    CPF(playerid, -1, "Level up! You are now level %d.", cInfo[playerid][cLevel]);
	}
	if(cInfo[playerid][cJob] > 0)
	    cInfo[playerid][cJobHours] += 1;
	    
	cInfo[playerid][cTotalHours] += 1;
	cInfo[playerid][cPaycheck] = 0;
	return 1;
}
I also forgot to mention, my account is still online in-game, I logged on yesterday and this happened, and I didn't restart the server after that. I'll let it be like that (I won't restart the server) until we solve this.
http://i.imgur.com/BK6KLBM.png
__________________
https://github.com/sirajuddin97
SiraBots is offline   Reply With Quote
Old 27/03/2014, 08:17 PM   #6
SiraBots
Big Clucker
 
SiraBots's Avatar
 
Join Date: Jun 2012
Posts: 85
Reputation: 10
Default Re: Stuck on "Connected. Joining the game..."

Found out it was my mysql_ping(0) running all the time, which overloaded the server. It's been solved now.
Thank you a bunch to everyone who helped me, though!
__________________
https://github.com/sirajuddin97
SiraBots is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
stuck at "connected, joining the game" minimalmatyi Client Support 10 17/01/2015 06:25 AM
Stuck on "Connected. Joining the game..." cosbraa Client Support 5 10/12/2012 12:34 AM
Server stuck at "Connected. Joining......" newbienoob Server Support 6 04/05/2012 05:28 AM
Stuck on "Connected. Joining to the server" tal_peretz Scripting Help 12 15/02/2012 06:26 PM


All times are GMT. The time now is 09:32 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.