Mod from TOTAL SCRATCH
#1

Hello, I want to create a mod from total scratch, that means without that "spawn" thing on start, is there any way to get rid of that? you know, when you connect to the server you have dialog box with "<<" ">>" and "spawn", i wanna get rid of that because I want to create login, register etc, and I don't know how to stop that -.-'

basically I have this:
PHP код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
new password[5] = "mypw";
new 
iLoginDialog 2;
new 
logged 0;
main()
{
    print(
"\n----------------------------------");
    print(
" Project-Caradhras.com Real Life v0.1");
    print(
"----------------------------------\n");
}
public 
OnGameModeInit()
{
    
SetGameModeText("Caradhras Real Life v0.1");
    
AddPlayerClass(01958.37831343.157215.3746269.1425000000);
    
AddStaticVehicle(4681960134515.4269252251);
    return 
1;
}
public 
OnPlayerRequestClass(playeridclassid)
{
    
SetPlayerPos(playerid1958.37831343.157215.3746);
    
SetPlayerCameraPos(playerid1958.37831343.157215.3746);
    
SetPlayerCameraLookAt(playerid1958.37831343.157215.3746);
    return 
1;
}
public 
OnPlayerConnect(playerid)
{
    
ShowPlayerDialog(playeridiLoginDialogDIALOG_STYLE_PASSWORD"Login""Enter Your Password!""Login""Cancel");
    return 
1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
    if (
strcmp("/help"cmdtexttrue5) == 0)
    {
        
SendClientMessage(playerid0xFFFFFF"You used /help command");
        return 
1;
    }
    if (
strcmp("/test"cmdtexttrue5) == 0)
    {
        
ShowPlayerDialog(playerid1DIALOG_STYLE_LIST"What is it that you want?""Sprunk ($1)\nBeer ($2)\nWine ($3)""Purchase""Cancel");
        return 
1;
    }
    return 
0;
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == iLoginDialog)
    {
        if(
response)
        {
            if(
strlen(inputtext) > 0)
            {
                if(
strcmp(inputtextpasswordtrue4) == 0)
                {
                    
logged 1;
                    return 
1;
                }
            }
        }
        
ShowPlayerDialog(playerid2DIALOG_STYLE_PASSWORD"Login""Enter Your Password!""Login""Cancel");
    }
    return 
1;

now how the hell can I show that spawn dialog AFTER HE SUCCESSFULLY logs in?
Reply


Messages In This Thread
Mod from TOTAL SCRATCH - by SEnergy - 27.07.2012, 08:02
Re: Mod from TOTAL SCRATCH - by Cjgogo - 27.07.2012, 08:18
Re: Mod from TOTAL SCRATCH - by SEnergy - 27.07.2012, 08:32

Forum Jump:


Users browsing this thread: 1 Guest(s)