A Engine Bug/SAMP Bug i found and i can't Play!
#1

Hi!
I found a Bug, And it's Just Trolling me out to the Peeps Mother!!!!!
Look:
When Playing Logging-in / registering, The Player Won't Spawn after Pressing the Login / Register Botton at the Dialog, SO they need to Press it << But This is The BullShit!
When I Press Spawn! My Graphivs Trolling... And Trolling... I have Falshing White Screen and "Stay and the World Boundries" I read about that, And i didn't Found the Answer! Please tel me the answer and Do not Post Those Shitty Comments: "I had that too, DOnt know how to fix..." "LoL" It's Trolling me Crazzyyy, Shouting on my Shitty Peep Computer!!!
Reply
#2

you made a mistake in your code. Most likely on your onrequestclass, or onplayerspawn
Reply
#3

Quote:
Originally Posted by Abreezy
View Post
you made a mistake in your code. Most likely on your onrequestclass, or onplayerspawn
pawn Code:
public OnPlayerRequestClass(playerid, classid)
{
    return 1;
}

public OnPlayerRequestSpawn(playerid)
{
    if(logged[playerid] == 0)
    {
        new playerfile[100], pname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, pname, sizeof(pname));
        format(playerfile, sizeof(playerfile), "Users/%s.ini",pname);
        if(dini_Exists(playerfile) && logged[playerid] == 0) ShowPlayerDialog(playerid,200,DIALOG_STYLE_INPUT,"{B8860B}Log-In","Log-In Before Spawn!\nType Your Account Password To Join The Server","Log-In","Cancel");
        if(!dini_Exists(playerfile) && logged[playerid] == 0) ShowPlayerDialog(playerid,201,DIALOG_STYLE_INPUT,"{B8860B}Register","Register Before Spawn!\nType Your Account Password To Join The Server","Register","Cancel");
        return 1;
    }
    return 1;
}
There are Problesm Here?
Reply
#4

Show your register/login
Reply
#5

show your
pawn Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
callback
Reply
#6

pawn Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 201)
    {
        if(!strlen(inputtext)) return ShowPlayerDialog(playerid,201,DIALOG_STYLE_INPUT,"{B8860B}Register","You didn't Type any password, Type again Below:","Register","Cancel");
        ForcePlayerToRS(playerid);
        new playerfile[128], pname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, pname, sizeof(pname));
        format(playerfile, sizeof(playerfile), "Users/%s.ini",pname);
        if(dini_Exists(playerfile)) return SendClientMessage(playerid, White, "SERVER: You are already Logged in.");
        new playerip[20];
        GetPlayerIp(playerid, playerip, sizeof(playerip));
        dini_Create(playerfile);
        dini_IntSet(playerfile, "Password", udb_hash(inputtext));
        dini_Set(playerfile, "Ip", playerip);
        dini_IntSet(playerfile, "Level", 0);
        dini_IntSet(playerfile, "Cash", 0);
        logged[playerid] = 1;
        SendClientMessage(playerid, White, "SERVER: You have Registered Successful, And Logged in.");
        return 1;
    }
    if(dialogid == 200)
    {
        if(!strlen(inputtext)) return ShowPlayerDialog(playerid,200,DIALOG_STYLE_INPUT,"{B8860B}Log-In","You didn't Type any password, Type again Below:","Log-In","Cancel");
        new playerfile[100], pname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, pname, sizeof(pname));
        format(playerfile, sizeof(playerfile), "Users/%s.ini",pname);
        if(!dini_Exists(playerfile)) return SendClientMessage(playerid, White, "SERVER: This Account Isn't Registered. Register Before Logging-In. (( Use /register ))");
        new tmp[256];
        tmp = dini_Get(playerfile, "Password");
        if(udb_hash(inputtext) == strval(tmp))
        {
            new playerip[20];
            GetPlayerIp(playerid, playerip, sizeof(playerip));
            level[playerid] = dini_Int(playerfile, "Level");
            logged[playerid] = 1;
            SpawnPlayer(playerid);
            dini_Set(playerfile, "Ip", playerip);
            GivePlayerMoney(playerid, dini_Int(playerfile, "Cash"));
            logged[playerid] = 1;
            if(Bcon[playerid] == 1)
            {
                SetPlayerInterior(playerid, dini_Int(playerfile, "Interior"));
                SetPlayerVirtualWorld(playerid, dini_Int(playerfile, "VW"));
                SetPlayerPos(playerid, dini_Float(playerfile, "PosX"), dini_Float(playerfile, "PosY"), dini_Float(playerfile, "PosZ"));
                SetPlayerFacingAngle(playerid, dini_Float(playerfile, "RotZ"));
                Bcon[playerid] = 0;
            }
        }
        else return ShowPlayerDialog(playerid,200,DIALOG_STYLE_INPUT,"{B8860B}Log-In","Invalid Password!\nType Your Account Password To Join The Server","Log-In","Cancel");
    }
    return 1;
}
Do not Copy Pls
Reply
#7

pawn Code:
SetPlayerInterior(playerid, dini_Int(playerfile, "Interior"));
                SetPlayerVirtualWorld(playerid, dini_Int(playerfile, "VW"));
                SetPlayerPos(playerid, dini_Float(playerfile, "PosX"), dini_Float(playerfile, "PosY"), dini_Float(playerfile, "PosZ"));
                SetPlayerFacingAngle(playerid, dini_Float(playerfile, "RotZ"));
does the coords/interior/vw load up correctly?
Reply
#8

Try using "SetSpawnInfo" and "SpawnPlayer(playerid)" check the wiki for more information on both.
Reply
#9

Lmao, welcome.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)