MySQL problem (i think)
#1

Hello! I saw the Arthur Kane's work on a Base Roleplay Script and I downloaded it. I want to try it but I got a problem. Before this problem i got others but I solved them.

So.. what's the problem? When I start the console shows me this :



Okay, I think ur gonna say everything is right, but it's not.

When I enter IG, all it's like this :



Can someone help me? If u ask me about the mysql_log.txt, I don't have it on the SA:MP's server folder.
Reply
#2

OnPlayerConnect is skipped and it sends you to OnPlayerRequestClassSelection

Post your OnPlayerConnect code
Reply
#3

Quote:
Originally Posted by Lucases
Посмотреть сообщение
OnPlayerConnect is skipped and it sends you to OnPlayerRequestClassSelection

Post your OnPlayerConnect code
Take a look here :

Код:
public OnPlayerConnect(playerid)
{
	ResetPlayer(playerid);
	PreloadAnimations(playerid); 
	
	SetPlayerColor(playerid, 0xAFAFAFFF); 
	SetPlayerTeam(playerid, PLAYER_STATE_ALIVE); 
	
	//Dualies;
	SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 899);
	SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 0);
	SetPlayerSkillLevel(playerid, WEAPONSKILL_SPAS12_SHOTGUN, 0);

	new 
		existCheck[60]
	; 
	
	mysql_format(ourConnection, existCheck, sizeof(existCheck), "SELECT * FROM bannedlist WHERE IpAddress = '%e'", ReturnIP(playerid));
	mysql_tquery(ourConnection, existCheck, "CheckBanList", "i", playerid);
	// We'll check if their IP is linked to any players on the bannedlist.
	// A master account DBID ban will be checked once they login. 
	
	SetPlayerCamera(playerid);
	
	//Unscrambler Textdraws:
	Unscrambler_PTD[playerid][0] = CreatePlayerTextDraw(playerid, 199.873275, 273.593383, "<UNSCRAMBLED_WORD>");
	PlayerTextDrawLetterSize(playerid, Unscrambler_PTD[playerid][0], 0.206330, 1.118813);
	PlayerTextDrawAlignment(playerid, Unscrambler_PTD[playerid][0], 1);
	PlayerTextDrawColor(playerid, Unscrambler_PTD[playerid][0], -1);
	PlayerTextDrawSetShadow(playerid, Unscrambler_PTD[playerid][0], 0);
	PlayerTextDrawSetOutline(playerid, Unscrambler_PTD[playerid][0], 1);
	PlayerTextDrawBackgroundColor(playerid, Unscrambler_PTD[playerid][0], 255);
	PlayerTextDrawFont(playerid, Unscrambler_PTD[playerid][0], 2);
	PlayerTextDrawSetProportional(playerid, Unscrambler_PTD[playerid][0], 1);
	PlayerTextDrawSetShadow(playerid, Unscrambler_PTD[playerid][0], 0);

	Unscrambler_PTD[playerid][1] = CreatePlayerTextDraw(playerid, 137.369461, 273.593383, "/unscramble");
	PlayerTextDrawLetterSize(playerid, Unscrambler_PTD[playerid][1], 0.206330, 1.118813);
	PlayerTextDrawAlignment(playerid, Unscrambler_PTD[playerid][1], 1);
	PlayerTextDrawColor(playerid, Unscrambler_PTD[playerid][1], -490707969);
	PlayerTextDrawSetShadow(playerid, Unscrambler_PTD[playerid][1], 0);
	PlayerTextDrawSetOutline(playerid, Unscrambler_PTD[playerid][1], 1);
	PlayerTextDrawBackgroundColor(playerid, Unscrambler_PTD[playerid][1], 255);
	PlayerTextDrawFont(playerid, Unscrambler_PTD[playerid][1], 2);
	PlayerTextDrawSetProportional(playerid, Unscrambler_PTD[playerid][1], 1);
	PlayerTextDrawSetShadow(playerid, Unscrambler_PTD[playerid][1], 0);

	Unscrambler_PTD[playerid][2] = CreatePlayerTextDraw(playerid, 305.179687, 273.593383, "TO_UNSCRAMBLE_THE_WORD");
	PlayerTextDrawLetterSize(playerid, Unscrambler_PTD[playerid][2], 0.206330, 1.118813);
	PlayerTextDrawAlignment(playerid, Unscrambler_PTD[playerid][2], 1);
	PlayerTextDrawColor(playerid, Unscrambler_PTD[playerid][2], -2147483393);
	PlayerTextDrawSetShadow(playerid, Unscrambler_PTD[playerid][2], 0);
	PlayerTextDrawSetOutline(playerid, Unscrambler_PTD[playerid][2], 1);
	PlayerTextDrawBackgroundColor(playerid, Unscrambler_PTD[playerid][2], 255);
	PlayerTextDrawFont(playerid, Unscrambler_PTD[playerid][2], 2);
	PlayerTextDrawSetProportional(playerid, Unscrambler_PTD[playerid][2], 1);
	PlayerTextDrawSetShadow(playerid, Unscrambler_PTD[playerid][2], 0);

	Unscrambler_PTD[playerid][3] = CreatePlayerTextDraw(playerid, 141.369705, 285.194091, "scrambledword");
	PlayerTextDrawLetterSize(playerid, Unscrambler_PTD[playerid][3], 0.206330, 1.118813);
	PlayerTextDrawAlignment(playerid, Unscrambler_PTD[playerid][3], 1);
	PlayerTextDrawColor(playerid, Unscrambler_PTD[playerid][3], -1);
	PlayerTextDrawSetShadow(playerid, Unscrambler_PTD[playerid][3], 0);
	PlayerTextDrawSetOutline(playerid, Unscrambler_PTD[playerid][3], 1);
	PlayerTextDrawBackgroundColor(playerid, Unscrambler_PTD[playerid][3], 255);
	PlayerTextDrawFont(playerid, Unscrambler_PTD[playerid][3], 2);
	PlayerTextDrawSetProportional(playerid, Unscrambler_PTD[playerid][3], 1);
	PlayerTextDrawSetShadow(playerid, Unscrambler_PTD[playerid][3], 0);

	Unscrambler_PTD[playerid][4] = CreatePlayerTextDraw(playerid, 137.902801, 296.924377, "YOU_HAVE");
	PlayerTextDrawLetterSize(playerid, Unscrambler_PTD[playerid][4], 0.206330, 1.118813);
	PlayerTextDrawAlignment(playerid, Unscrambler_PTD[playerid][4], 1);
	PlayerTextDrawColor(playerid, Unscrambler_PTD[playerid][4], -2147483393);
	PlayerTextDrawSetShadow(playerid, Unscrambler_PTD[playerid][4], 0);
	PlayerTextDrawSetOutline(playerid, Unscrambler_PTD[playerid][4], 1);
	PlayerTextDrawBackgroundColor(playerid, Unscrambler_PTD[playerid][4], 255);
	PlayerTextDrawFont(playerid, Unscrambler_PTD[playerid][4], 2);
	PlayerTextDrawSetProportional(playerid, Unscrambler_PTD[playerid][4], 1);
	PlayerTextDrawSetShadow(playerid, Unscrambler_PTD[playerid][4], 0);

	Unscrambler_PTD[playerid][5] = CreatePlayerTextDraw(playerid, 184.539016, 297.024383, "001");
	PlayerTextDrawLetterSize(playerid, Unscrambler_PTD[playerid][5], 0.206330, 1.118813);
	PlayerTextDrawAlignment(playerid, Unscrambler_PTD[playerid][5], 1);
	PlayerTextDrawColor(playerid, Unscrambler_PTD[playerid][5], -1);
	PlayerTextDrawSetShadow(playerid, Unscrambler_PTD[playerid][5], 0);
	PlayerTextDrawSetOutline(playerid, Unscrambler_PTD[playerid][5], 1);
	PlayerTextDrawBackgroundColor(playerid, Unscrambler_PTD[playerid][5], 255);
	PlayerTextDrawFont(playerid, Unscrambler_PTD[playerid][5], 2);
	PlayerTextDrawSetProportional(playerid, Unscrambler_PTD[playerid][5], 1);
	PlayerTextDrawSetShadow(playerid, Unscrambler_PTD[playerid][5], 0);

	Unscrambler_PTD[playerid][6] = CreatePlayerTextDraw(playerid, 202.540191, 297.124389, "SECONDS_LEFT_TO_FINISh.");
	PlayerTextDrawLetterSize(playerid, Unscrambler_PTD[playerid][6], 0.206330, 1.118813);
	PlayerTextDrawAlignment(playerid, Unscrambler_PTD[playerid][6], 1);
	PlayerTextDrawColor(playerid, Unscrambler_PTD[playerid][6], -2147483393);
	PlayerTextDrawSetShadow(playerid, Unscrambler_PTD[playerid][6], 0);
	PlayerTextDrawSetOutline(playerid, Unscrambler_PTD[playerid][6], 1);
	PlayerTextDrawBackgroundColor(playerid, Unscrambler_PTD[playerid][6], 255);
	PlayerTextDrawFont(playerid, Unscrambler_PTD[playerid][6], 2);
	PlayerTextDrawSetProportional(playerid, Unscrambler_PTD[playerid][6], 1);
	PlayerTextDrawSetShadow(playerid, Unscrambler_PTD[playerid][6], 0);
	
	//Plate Textdraw:
	CarBought_PTD[playerid][0] = CreatePlayerTextDraw(playerid, 97.333351, 291.629669, "YOUR_NEW_PLATE_HAS_BEEN_SET");
	PlayerTextDrawLetterSize(playerid, CarBought_PTD[playerid][0], 0.248666, 1.259851);
	PlayerTextDrawAlignment(playerid, CarBought_PTD[playerid][0], 1);
	PlayerTextDrawColor(playerid, CarBought_PTD[playerid][0], -1);
	PlayerTextDrawSetShadow(playerid, CarBought_PTD[playerid][0], 0);
	PlayerTextDrawSetOutline(playerid, CarBought_PTD[playerid][0], 1);
	PlayerTextDrawBackgroundColor(playerid, CarBought_PTD[playerid][0], 255);
	PlayerTextDrawFont(playerid, CarBought_PTD[playerid][0], 2);
	PlayerTextDrawSetProportional(playerid, CarBought_PTD[playerid][0], 1);
	PlayerTextDrawSetShadow(playerid, CarBought_PTD[playerid][0], 0);

	CarBought_PTD[playerid][1] = CreatePlayerTextDraw(playerid, 97.533348, 302.630340, "PLATEHERE");
	PlayerTextDrawLetterSize(playerid, CarBought_PTD[playerid][1], 0.248666, 1.259851);
	PlayerTextDrawAlignment(playerid, CarBought_PTD[playerid][1], 1);
	PlayerTextDrawColor(playerid, CarBought_PTD[playerid][1], -490707969);
	PlayerTextDrawSetShadow(playerid, CarBought_PTD[playerid][1], 0);
	PlayerTextDrawSetOutline(playerid, CarBought_PTD[playerid][1], 1);
	PlayerTextDrawBackgroundColor(playerid, CarBought_PTD[playerid][1], 255);
	PlayerTextDrawFont(playerid, CarBought_PTD[playerid][1], 2);
	PlayerTextDrawSetProportional(playerid, CarBought_PTD[playerid][1], 1);
	PlayerTextDrawSetShadow(playerid, CarBought_PTD[playerid][1], 0);
	return 1;
}
Reply
#4

Show me "SetPlayerCamera" custom function and "CheckBanList" callback
Reply
#5

Quote:
Originally Posted by Lucases
Посмотреть сообщение
Show me "SetPlayerCamera" custom function and "CheckBanList" callback
That's the "CheckBanList"

PHP код:
function:CheckBanList(playerid)
{    
    if(!
cache_num_rows())
    {
        new 
existCheck[129];
    
        
mysql_format(ourConnectionexistChecksizeof(existCheck), "SELECT acc_dbid FROM masters WHERE acc_name = '%e'"ReturnName(playerid));
        
mysql_tquery(ourConnectionexistCheck"LogPlayerIn""i"playerid);
    }
    else
    {
        
SendServerMessage(playerid"Your IP \"%s\" is banned from our servers."ReturnIP(playerid));
        
SendServerMessage(playerid"You may appeal your ban on our forums."); 
        return 
KickEx(playerid);
    }
    return 
1;

That's the SetPlayerCamera :

PHP код:
function:SetPlayerCamera(playerid)
{
    new 
rand random(3);
    switch(
rand)
    {
        case 
0:
        {
               
SetPlayerCameraPos(playerid1249.3018, -1697.804699.9554);
            
SetPlayerCameraLookAt(playerid1249.6576, -1696.865699.4902);
        }
        case 
1:
        {
               
SetPlayerCameraPos(playerid2151.2539, -1894.544785.3924);
            
SetPlayerCameraLookAt(playerid2150.5833, -1893.806684.6774);
        }
        case 
2:
        {
               
SetPlayerCameraPos(playerid2169.0635, -1740.4182112.0308);
            
SetPlayerCameraLookAt(playerid2170.0603, -1740.3655111.3108);
        }
    }
    return 
1;

Reply
#6

Someone?
Reply
#7

some1?
Reply
#8

bump
Reply
#9

somenoneeeee
Reply
#10

Make sure you're actually connected to your database.

Check mysql_logs aswell.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)