SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 18/02/2020, 10:11 PM   #1
wilking
Little Clucker
 
Join Date: May 2017
Posts: 30
Reputation: 0
Default help me query server login

I don't know what I used to make my gamemode very slow to login.

I have to wait 10-15 seconds to see the dialog_password.

I have used a lot of "tasks" in my gamemode, I wonder if this will cause this delay, below is all the code related to my login, please help me

PHP Code:
public OnPlayerConnect(playerid) {
    
    
//ts3
    
TS_SampOnlines ++;
    
UpdateSampOnlinesChannel();
    
TSClientID[playerid] = -1;
    
moved[playerid] = 0;
    
TSState[playerid] = 0;
    
Delete3DTextLabel(TSLabel[playerid]);
    
    
DeletePVar(playerid"nndc");
    
DeletePVar(playerid"nnbt");
    if(
PlayerInfo[playerid][tuloz] > 0){
        
//SetPlayerHealth(playerid, 9999);
        
SetPlayerSkin(playerid50);
        
SetPlayerColor(playeridCOLOR_BLACK);
        
Player_StreamPrep(playerid, -303.6095,1894.9181,29.8929FREEZE_TIME);
    }
    
// Delete3DTextLabel(familylabel);
    // Delete3DTextLabel(teamlabel);

    
if(IsPlayerNPC(playerid)) return 1;

    
g_arrQueryHandle{playerid} = random(256);

    
TotalConnect++;
    if(
Iter_Count(Player) > MaxPlayersConnected) {
        
MaxPlayersConnected Iter_Count(Player);
        
getdate(MPYear,MPMonth,MPDay);
    }
    
SetPlayerSkillLevel(playeridWEAPONSKILL_PISTOL1);
    
SetPlayerSkillLevel(playeridWEAPONSKILL_MICRO_UZI1);

    
//huong dan
    
TutTimer[playerid] = 0;
    
// CheckGod[playerid] = 0;
    //Uber
    
UberCall[playerid] = false;
    
UberMap[playerid] = false;
    
UberAccepted[playerid] = INVALID_PLAYER_ID;
    
UberCallTime[playerid] = false;
    
OnUber[playerid] = false;
    
AcUBCall[playerid] = false;
    
UberDriver[playerid] = INVALID_PLAYER_ID;
    
UseUber[playerid] = false;

    
//noithat
    
MuaInt[playerid] = 0;
    
IntHouse[playerid] = 0;


    
SetPVarInt(playerid"IsInArena", -1);
    
SetPVarInt(playerid"ArenaNumber", -1);
    
SetPVarInt(playerid"ArenaEnterPass", -1);
    
SetPVarInt(playerid"ArenaEnterTeam", -1);
    
SetPVarInt(playerid"EditingTurfs", -1);
    
SetPVarInt(playerid"EditingTurfsStage", -1);
    
SetPVarInt(playerid"EditingHillStage", -1);
    
SetPVarInt(playerid"EditingFamC", -1);
    
SetPVarInt(playerid"editingfamhq"INVALID_FAMILY_ID);
    
SetPVarInt(playerid"UsingSurfAttachedObject", -1);
    
SetPVarInt(playerid"UsingBriefAttachedObject", -1);
    
SetPVarInt(playerid"AOSlotPaintballFlag", -1);
    
SetPVarInt(playerid"MovingStretcher", -1);
    
SetPVarInt(playerid"DraggingPlayer"INVALID_PLAYER_ID);
    
SetPVarInt(playerid"ttSeller"INVALID_PLAYER_ID);
    
SetPVarInt(playerid"ttBuyer"INVALID_PLAYER_ID);
    
SetPVarInt(playerid"ttCost"0);
    
SetPVarInt(playerid"buyingVoucher"INVALID_PLAYER_ID);
    
SetPVarInt(playerid"sellerVoucher"INVALID_PLAYER_ID);
    
SetPVarInt(playerid"buyerVoucher"INVALID_PLAYER_ID);
    
DeletePVar(playerid"BeingDragged");
    
DeletePVar(playerid"PlayerCuffed");
    
DeletePVar(playerid"COMMUNITY_ADVISOR_REQUEST");

    
HackingMods[playerid] = 0;
    
pSpeed[playerid] = 0.0;
    
//SetTimerEx("HackingTimer", 1000, 0, "i", playerid);

    
for(new 03i++) {
        
StopaniFloats[playerid][i] = 0;
    }


    for(new 
03i++) {
        
ConfigEventCPs[playerid][i] = 0;
    }
    
ConfigEventCPId[playerid] = 0;
    
RCPIdCurrent[playerid] = 0;

    for(new 
06i++) {
        
EventFloats[playerid][i] = 0.0;
    }
    
EventLastInt[playerid] = 0EventLastVW[playerid] = 0;

    for(new 
06i++) {
        
HHcheckFloats[playerid][i] = 0;
    }

    for(new 
0MAX_PLAYERVEHICLES; ++i) {
        
PlayerVehicleInfo[playerid][i][pvModelId] = 0;
        
PlayerVehicleInfo[playerid][i][pvId] = INVALID_PLAYER_VEHICLE_ID;
        
PlayerVehicleInfo[playerid][i][pvSpawned] = 0;
        
PlayerVehicleInfo[playerid][i][pvSlotId] = 0;
    }

    for(new 
0MAX_PLAYERTOYSi++) {
        
PlayerToyInfo[playerid][i][ptID] = -1;
        
PlayerToyInfo[playerid][i][ptModelID] = 0;
        
PlayerToyInfo[playerid][i][ptBone] = 0;
        
PlayerToyInfo[playerid][i][ptSpecial] = 0;
    }

    for(new 
011i++) {
        
PlayerHoldingObject[playerid][i] = 0;
    }

    for(new 
05i++) {
        
LottoNumbers[playerid][i] = 0;
    }

    for(new 
0MAX_BUSINESSSALESi++) {
        
Selected[playerid][i] = 0;
    }
    for(new 
x=0mS_SELECTION_ITEMSx++) {
        
gSelectionItems[playerid][x] = PlayerText:INVALID_TEXT_DRAW;
    }

    
gHeaderTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
    
gBackgroundTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
    
gCurrentPageTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
    
gNextButtonTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
    
gPrevButtonTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
    
gCancelButtonTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;

    
SpoofKill[playerid] = 0;
    
KillTime[playerid] = 0;
    
gItemAt[playerid] = 0;
    
TruckUsed[playerid] = INVALID_VEHICLE_ID;
    
pDrunkLevelLast[playerid] = 0;
    
pFPS[playerid] = 0;
    
BackupClearTimer[playerid] = 0;
    
Backup[playerid] = 0;
    
CarRadars[playerid] = 0;
    
CurrentArmor[playerid] = 0.0;
    
PlayerInfo[playerid][pReg] = 0;
    
HHcheckVW[playerid] = 0;
    
HHcheckInt[playerid] = 0;
    
OrderAssignedTo[playerid] = INVALID_PLAYER_ID;
    
TruckUsed[playerid] = INVALID_VEHICLE_ID;
    
HouseOffer[playerid] = INVALID_PLAYER_ID;
    
House[playerid] = 0;
    
HousePrice[playerid] = 0;
    
playerTabbed[playerid] = 0;
    
playerAFK[playerid] = 0;
    
gBug{playerid} = 1;
    
TazerTimeout[playerid] = 0;
    
// gRadio{playerid} = 1;
    
playerLastTyped[playerid] = 0;
    
pTazer{playerid} = 0;
    
pTazerReplace{playerid} = 0;
    
pCurrentWeapon{playerid} = 0;
    
MedicAccepted[playerid] = INVALID_PLAYER_ID;
    
DefendOffer[playerid] = INVALID_PLAYER_ID;
    
AppealOffer[playerid] = INVALID_PLAYER_ID;
    
AppealOfferAccepted[playerid] = 0;
    
PlayerInfo[playerid][pWantedLevel] = 0;
    
DefendPrice[playerid] = 0;
    
Spectating[playerid] = 0;
    
GettingSpectated[playerid] = INVALID_PLAYER_ID;
    
PlayerInfo[playerid][pPhonePrivacy] = 0;
    
NewbieTimer[playerid] = 0;
    
CNCTimer[playerid] = 0;
    
HlKickTimer[playerid] = 0;
    
HelperTimer[playerid] = 0;
    
VehicleOffer[playerid] = INVALID_PLAYER_ID;
    
VehiclePrice[playerid] = 0;
    
VehicleId[playerid] = -1;
    
NOPTrigger[playerid] = 0;
    
JustReported[playerid] = -1;
    
UsedCrack[playerid] = 0;
    
UsedWeed[playerid] = 0;
    
SexOffer[playerid] = INVALID_PLAYER_ID;
    
DrinkOffer[playerid] =  INVALID_PLAYER_ID;
    
PotOffer[playerid] = INVALID_PLAYER_ID;
    
PotStorageID[playerid] = -1;
    
CrackOffer[playerid] = INVALID_PLAYER_ID;
    
CrackStorageID[playerid] = -1;
    
GunOffer[playerid] = INVALID_PLAYER_ID;
    
GunStorageID[playerid] = -1;
    
CraftOffer[playerid] = INVALID_PLAYER_ID;
    
RepairOffer[playerid] = INVALID_PLAYER_ID;
    
GuardOffer[playerid] = INVALID_PLAYER_ID;
    
LiveOffer[playerid] = INVALID_PLAYER_ID;
    
RefillOffer[playerid] = INVALID_PLAYER_ID;
    
MatsOffer[playerid] = INVALID_PLAYER_ID;
    
MatsStorageID[playerid] = -1;
    
MatsPrice[playerid] = 0;
    
MatsAmount[playerid] = 0;
    
BoxOffer[playerid] = INVALID_PLAYER_ID;
    
MarryWitnessOffer[playerid] = INVALID_PLAYER_ID;
    
ProposeOffer[playerid] = INVALID_PLAYER_ID;
    
DivorceOffer[playerid] = INVALID_PLAYER_ID;
    
HidePM[playerid] = 0;
    
PhoneOnline[playerid] = 0;
    
unbanip[playerid][0] = 0;
    
advisorchat[playerid] = 1;
    
ChosenSkin[playerid]=0;
    
SelectFChar[playerid]=0;
    
MatsHolding[playerid]=0;
    
MatDeliver[playerid]=0;
    
MatDeliver2[playerid]=0;
    
szAdvert[playerid][0] = 0;
    
AdvertType[playerid] = 0;
    
SelectFCharPlace[playerid]=0;
    
GettingJob[playerid]=0;
    
GettingJob2[playerid]=0;
    
GuardOffer[playerid]= INVALID_PLAYER_ID;
    
GuardPrice[playerid]=0;
    
ApprovedLawyer[playerid]=0;
    
CallLawyer[playerid]=0;
    
WantLawyer[playerid]=0;
    
CurrentMoney[playerid]=0;
    
UsedFind[playerid]=0;
    
CP[playerid]=0;
    
Condom[playerid]=0;
    
SexOffer[playerid]= INVALID_PLAYER_ID;
    
SexPrice[playerid]=0;
    
PlayerInfo[playerid][pAdmin]=0;
    
RepairOffer[playerid]= INVALID_PLAYER_ID;
    
RepairPrice[playerid]=0;
    
RepairCar[playerid]=0;
    
TalkingLive[playerid]=INVALID_PLAYER_ID;
    
LiveOffer[playerid]= INVALID_PLAYER_ID;
    
RefillOffer[playerid]= INVALID_PLAYER_ID;
    
RefillPrice[playerid]=0;
    
InsidePlane[playerid]=INVALID_VEHICLE_ID;
    
InsideMainMenu{playerid}=0;
    
InsideTut{playerid}=0;
    
PotOffer[playerid]= INVALID_PLAYER_ID;
    
PotStorageID[playerid]=-1;
    
CrackOffer[playerid]= INVALID_PLAYER_ID;
    
CrackStorageID[playerid]=-1;
    
PlayerCuffed[playerid]=0;
    
PlayerCuffedTime[playerid]=0;
    
PotPrice[playerid]=0;
    
CrackPrice[playerid]=0;
    
RegistrationStep[playerid]=0;
    
PotGram[playerid]=0;
    
CrackGram[playerid]=0;
    
PlayerInfo[playerid][pBanned]=0;
    
ConnectedToPC[playerid]=0;
    
OrderReady[playerid]=0;
    
GunId[playerid]=0;
    
GunMats[playerid]=0;
    
CraftId[playerid]=0;
    
CraftMats[playerid]=0;
    
HitOffer[playerid]= INVALID_PLAYER_ID;
    
HitToGet[playerid]= INVALID_PLAYER_ID;
    
InviteOffer[playerid]= INVALID_PLAYER_ID;
    
InviteFamily[playerid]=INVALID_FAMILY_ID;
    
hInviteHouse[playerid]=INVALID_HOUSE_ID;
    
hInviteOffer[playerid]= INVALID_PLAYER_ID;
    
hInviteOfferTo[playerid]= INVALID_PLAYER_ID;
    
JailPrice[playerid]=0;
    
GotHit[playerid]=0;
    
GoChase[playerid]= INVALID_PLAYER_ID;
    
GetChased[playerid]= INVALID_PLAYER_ID;
    
CalledCops[playerid]=0;
    
CopsCallTime[playerid]=0;
    
BoxWaitTime[playerid]=0;
    
CalledMedics[playerid]=0;
    
TransportDuty[playerid]=0;
    
PlayerTied[playerid]=0;
    
MedicsCallTime[playerid]=0;
    
BusCallTime[playerid]=0;
    
TaxiCallTime[playerid]=0;
    
EMSCallTime[playerid]=0;
    
MedicCallTime[playerid]=0;
    
MechanicCallTime[playerid]=0;
    
FindTimePoints[playerid]=0;
    
FindingPlayer[playerid]=-1;
    
FindTime[playerid]=0;
    
JobDuty[playerid]=0;
    
Mobile[playerid]=INVALID_PLAYER_ID;
    
Music[playerid]=0;
    
BoxOffer[playerid]= INVALID_PLAYER_ID;
    
PlayerBoxing[playerid]=0;
    
Spectate[playerid]= INVALID_PLAYER_ID;
    
PlayerDrunk[playerid]=0;
    
PlayerDrunkTime[playerid]=0;
    
format(PlayerInfo[playerid][pPrisonReason],128,"None");
    
FishCount[playerid]=0;
    
HelpingNewbie[playerid]= INVALID_PLAYER_ID;
    
turfWarsRadar[playerid]=0;
    
courtjail[playerid]=0;
    
gLastCar[playerid]=0;
    
FirstSpawn[playerid]=0;
    
JetPack[playerid]=0;
    
PlayerInfo[playerid][pKills]=0;
    
PlayerInfo[playerid][pPaintTeam]=0;
    
TextSpamTimes[playerid] = 0;
    
TextSpamUnmute[playerid] = 0;
     
CommandSpamTimes[playerid] = 0;
    
CommandSpamUnmute[playerid] = 0;
    
gOoc[playerid] = 0;
    
arr_Towing[playerid] = INVALID_VEHICLE_ID;
    
gNews[playerid] = 0;
    
gNewbie[playerid] = 1;
    
gHelp[playerid] = 1;
    
gFam[playerid] = 0;
    
gPlayerLogged{playerid} = 0;
    
gPlayerLogTries[playerid] = 0;
    
IsSpawned[playerid] = 0;
    
SpawnKick[playerid] = 0;
    
PlayerStoned[playerid] = 0;
    
PlayerInfo[playerid][pPot] = 0;
    
StartTime[playerid] = 0;

    
//Farmer
    
PlayerInfo[playerid][pNongSan] = 0;
    
//chan nuoi
    
PlayerInfo[playerid][pTanThit] = 0;
    
PlayerInfo[playerid][pTanThitBo] = 0;
    
PlayerInfo[playerid][pTanThitNgua] = 0;
    
//cansa
    
PlayerInfo[playerid][csstt] = 0;
    
PlayerInfo[playerid][csrand] = 0;

    
timecbcs[playerid] = 0;

    
//loto
    
PlayerInfo[playerid][lEnable] = 1;

    
TicketOffer[playerid] = INVALID_PLAYER_ID;
    
TicketMoney[playerid] = 0;
    
PlayerInfo[playerid][pVehicleKeysFrom] = INVALID_PLAYER_ID;
    
ActiveChatbox[playerid] = 1;
    
TutStep[playerid] = 0;
    
PlayerInfo[playerid][pVehicleKeys] = INVALID_PLAYER_VEHICLE_ID;
    
TaxiAccepted[playerid] = INVALID_PLAYER_ID;
    
EMSAccepted[playerid] = INVALID_PLAYER_ID;
    
BusAccepted[playerid] = INVALID_PLAYER_ID;
    
PlayerInfo[playerid][pCrack] = 0;
    
HireCar[playerid] = 299;
    
TransportValue[playerid] = 0;
    
TransportMoney[playerid] = 0;
    
TransportTime[playerid] = 0;
    
TransportCost[playerid] = 0;
    
TransportDriver[playerid] = INVALID_PLAYER_ID;
    
Locator[playerid] = 0;
    
ReleasingMenu[playerid] = INVALID_PLAYER_ID;
    
Fishes[playerid][pLastFish] = 0;
    
Fishes[playerid][pFishID] = 0;
    
ProposeOffer[playerid] = INVALID_PLAYER_ID;
    
MarryWitness[playerid] = INVALID_PLAYER_ID;
    
MarryWitnessOffer[playerid] = INVALID_PLAYER_ID;
    
MarriageCeremoney[playerid] = 0;
    
ProposedTo[playerid] = INVALID_PLAYER_ID;
    
GotProposedBy[playerid] = INVALID_PLAYER_ID;
    
DivorceOffer[playerid] = INVALID_PLAYER_ID;
    
gBike[playerid] = 0;
    
gBikeRenting[playerid] = 0;
    
Fixr[playerid] = 0;
    
VehicleSpawned[playerid] = 0;
    
ReportCount[playerid] = 0;
    
ReportHourCount[playerid] = 0;
    
PlayerInfo[playerid][pServiceTime] = 0;
    
Homes[playerid] = 0;
    ******
Checkvar[playerid] = 0;
    ******
CheckIsDone[playerid] = 0;
    
IsPlayerFrozen[playerid] = 0;
    
strdel(PlayerInfo[playerid][pAutoTextReply], 064);
    
rBigEarT[playerid] = 0;
    
aLastShot[playerid] = INVALID_PLAYER_ID;
    if(
IsValidDynamic3DTextLabel(RFLTeamN3D[playerid])) {
        
DestroyDynamic3DTextLabel(RFLTeamN3D[playerid]);
    }

    
// These need to be reset to prevent some bugs (DO NOT REMOVE)
    
PlayerInfo[playerid][pModel] = 0;
    
PlayerInfo[playerid][pLeader] = INVALID_GROUP_ID;
    
PlayerInfo[playerid][pMember] = INVALID_GROUP_ID;
    
PlayerInfo[playerid][pDivision] = INVALID_DIVISION;
    
PlayerInfo[playerid][pFMember] = INVALID_FAMILY_ID;
    
PlayerInfo[playerid][pRank] = INVALID_RANK;
    
PlayerInfo[playerid][pOrder] = 0;
    
PlayerInfo[playerid][pOrderConfirmed] = 0;
    
PlayerInfo[playerid][pBusiness] = INVALID_BUSINESS_ID;
    
acstruct[playerid][LastOnFootPosition][0] = 0.0acstruct[playerid][LastOnFootPosition][1] = 0.0acstruct[playerid][LastOnFootPosition][2] = 0.0;
    
acstruct[playerid][checkmaptp] = 0acstruct[playerid][maptplastclick] = 0;
    
acstruct[playerid][maptp][0] = 0.0acstruct[playerid][maptp][1] = 0.0acstruct[playerid][maptp][2] = 0.0;

    for(new 
0MAX_PLAYERSx++)
    {
        
ShotPlayer[playerid][x] = 0;
    }

    for(new 
0MAX_PLAYERVEHICLESv++) {
        
PlayerVehicleInfo[playerid][v][pvAllowedPlayerId] = INVALID_PLAYER_ID;
    }

    for(new 
012s++) {
        
PlayerInfo[playerid][pAGuns][s] = 0;
        
PlayerInfo[playerid][pGuns][s] = 0;
    }

    for(new 
040s++) {
        
ListItemReportId[playerid][s] = -1;
    }

    for(new 
020s++) {
        
ListItemRCPId[playerid][s] = -1;
    }

    
CancelReport[playerid] = -1;
    
GiveKeysTo[playerid] = INVALID_PLAYER_ID;
    
RocketExplosions[playerid] = -1;
    
ClearFishes(playerid);
    
ClearMarriage(playerid);

    
// Crash Fix - GhoulSlayeR
    
if(!InvalidNameCheck(playerid)) {
        return 
1;
    }

    
CheckAdminWhitelist(playerid);

    
/*new string[128], serial[64];
    gpci(playerid, serial, sizeof(serial));
    format(string, sizeof(string), "%s/checks/gpci.php?g=%s&n=%s&i=%s", SAMP_WEB, serial, GetPlayerNameExt(playerid), GetPlayerIpEx(playerid));
    HTTP(0, HTTP_HEAD, string, "", "");*/

    // Main Menu Features
    
InsideMainMenu{playerid} = 0;
    
InsideTut{playerid} = 0;

    
//ShowMainMenuGUI(playerid);
    
SetPlayerJoinCamera(playerid);
    
ClearChatbox(playerid);
    
SetPlayerVirtualWorld(playerid99999);

    
SetPlayerColor(playerid,TEAM_HIT_COLOR);
    
SendClientMessageplayeridCOLOR_WHITE"SERVER: Chao mung ban da den  GTA:ONLINE." );

    
SyncPlayerTime(playerid);

    
ShowNoticeGUIFrame(playerid1);

    
SetTimerEx("LoginCheckEx"50000"i"playerid);
    
//RemoveBuildings(playerid);
    
return 1;

wilking is offline   Reply With Quote
Old 19/02/2020, 12:14 PM   #2
Shamans
Little Clucker
 
Shamans's Avatar
 
Join Date: Oct 2019
Posts: 12
Reputation: 0
Default Re: help me query server login

Set the timer to 10-15 seconds before calling the dialog.
An example can be followed by the beginning of the operation, set a timer - inform the player. When the timer is over, you show the dialog
Shamans 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
MYSQL - login with threded query Ax3l123 Scripting Help 2 03/08/2016 05:26 PM
cant login (threaded query) Bondage Scripting Help 1 14/01/2015 09:15 AM
Failed to exeute query. Lost connection to MySQL server during query. *IsBack Help Archive 10 06/01/2011 08:50 AM
Mysql Query not working anymore, (Login System) oliverrud Help Archive 5 21/06/2010 03:52 PM
Server query url? kazimieras Server Support 2 02/03/2009 11:11 PM


All times are GMT. The time now is 12:01 PM.


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