[GameMode] My basic & clean RP gamemode
#16

//Okei, kasutab nььd ainult zcmd'd. Ьks probleem on kah.
It uses only zcmd now. One problem too.
pawn Code:
if(dialogid == 7)
    {
        if(response)
        {
            if(!strlen(inputtext))
                ShowPlayerDialog(playerid, 198, DIALOG_STYLE_INPUT, "SKIN", "Please input a skin ID to change your skin:", "Send", "Close");
            if(strval(inputtext) < 0 || strval(inputtext) > 299)
                ShowPlayerDialog(playerid, 198, DIALOG_STYLE_INPUT, "SKIN", "Invalid Skin ID. Choose another:", "Send", "Close");
            SetPlayerSkin(playerid, strval(inputtext));
            new str[64];
            format(str, 128, "New skin: %d", strval(inputtext));
            SendClientMessage(playerid, 0xFFFF00FF, str);
        }
    }
needs to be added to
pawn Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch( dialogid )
    {

        case DIALOG_REGISTER:
        {
            if (!response) return Kick(playerid);
            if(response)
            {
                if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""COL_WHITE"Registering...",""COL_RED"You have entered an invalid password.\n"COL_WHITE"Type your password below to register a new account.","Register","Quit");
                new INI:File = INI_Open(UserPath(playerid));
                INI_SetTag(File,"data");
                INI_WriteInt(File,"Password",udb_hash(inputtext));
                INI_WriteInt(File,"Cash",0);
                INI_WriteInt(File,"Admin",0);
                INI_WriteInt(File,"Telefoninumber", 0);
                INI_WriteInt(File,"Kills",0);
                INI_WriteInt(File,"Deaths",0);
                INI_WriteInt(File,"Annetaja",0);
                INI_WriteInt(File,"Sugu",1);
                INI_WriteInt(File,"Vanus",0);
                INI_WriteInt(File,"Hoiatusi",0);
                INI_WriteInt(File,"P2rit",1);
                INI_WriteInt(File,"Lukus",0);
                INI_Close(File);

                new randphone = 500000 + random(599999);
                PlayerInfo[playerid][pNumber] = randphone;
                Mobile[playerid] = 255;
                SetSpawnInfo(playerid, 0, 0,-1464.5887,2590.8757,55.8359,0.5974,0,0,0,0,0,0);
                SpawnPlayer(playerid);
                ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,""COL_WHITE"Хnnestus!",""COL_GREEN"Sa logisid sisse.\n "COL_GREEN"Serveri nimi: "COL_WHITE"aCe' Gamingu Rollimдngu server [0.3c]\n "COL_GREEN"IP:"COL_WHITE"88.196.165.136\n "COL_GREEN"TS:"COL_WHITE"88.196.165.136","Okei","");
            }
        }

        case DIALOG_LOGIN:
        {
            if ( !response ) return Kick ( playerid );
            if( response )
            {
                if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
                {
                    INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
                    GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
                    Mobile[playerid] = 255;
                    SetSpawnInfo(playerid, 0, 0,-1464.5887,2590.8757,55.8359,0.5974,0,0,0,0,0,0);
                    SpawnPlayer(playerid);
                    ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,""COL_WHITE"Хnnestus!",""COL_GREEN"Sa logisid sisse.\n "COL_WHITE"Serveri nimi: aCe' Gamingu Rollimдngu server [0.3c]\n IP:88.196.165.136\n TS:88.196.165.136","Okei","");
                }
                else
                {
                    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_RED"Sa sisestasid vale parooli.\n"COL_WHITE"Sisesta oma parool, et sisse logida","Logi sisse","Lahku");
                }
                return 1;
            }
        }

    }
    return 1;
}
It would be cool if during the registering it will let you to choose your skin.
Reply


Messages In This Thread
My basic & clean RP gamemode [indev] - by vent - 17.09.2011, 15:29
Re: My basic & clean RP gamemode - by kiss - 17.09.2011, 15:30
Re: My basic & clean RP gamemode - by vent - 17.09.2011, 15:31
Re: My basic & clean RP gamemode - by vent - 17.09.2011, 15:39
Re: My basic & clean RP gamemode - by Aprezt - 17.09.2011, 15:53
Re: My basic & clean RP gamemode - by vent - 17.09.2011, 15:55
Re: My basic & clean RP gamemode - by SupremeCommander - 17.09.2011, 16:18
Re: My basic & clean RP gamemode - by Aprezt - 17.09.2011, 16:24
Re: My basic & clean RP gamemode - by vent - 17.09.2011, 16:36
Re: My basic & clean RP gamemode - by Aprezt - 17.09.2011, 17:04
Re: My basic & clean RP gamemode - by vent - 17.09.2011, 17:08
Re: My basic & clean RP gamemode - by Aprezt - 17.09.2011, 17:14
Re: My basic & clean RP gamemode - by ModianO - 17.09.2011, 17:28
Re: My basic & clean RP gamemode - by vent - 17.09.2011, 17:31
Re: My basic & clean RP gamemode - by FreshDoubleX - 17.09.2011, 17:33
Re: My basic & clean RP gamemode - by vent - 17.09.2011, 17:54
Re: My basic & clean RP gamemode - by BigAl - 17.09.2011, 18:05
Re: My basic & clean RP gamemode - by vent - 17.09.2011, 18:18
Re: My basic & clean RP gamemode - by =WoR=G4M3Ov3r - 17.09.2011, 18:21
Re: My basic & clean RP gamemode - by BigAl - 17.09.2011, 18:21
Re: My basic & clean RP gamemode - by vent - 17.09.2011, 19:23
Re: My basic & clean RP gamemode - by MadSkillz - 17.09.2011, 19:41
Re: My basic & clean RP gamemode - by vent - 17.09.2011, 19:55
Re: My basic & clean RP gamemode - by EladNahum - 18.09.2011, 11:25
Re: My basic & clean RP gamemode - by Yamoo - 18.09.2011, 12:41
Re: My basic & clean RP gamemode - by vent - 18.09.2011, 14:37
Re: My basic & clean RP gamemode - by CaHbKo - 18.09.2011, 15:14
Re: My basic & clean RP gamemode - by vent - 18.09.2011, 15:22
Re: My basic & clean RP gamemode - by vent - 18.09.2011, 18:56
Re: My basic & clean RP gamemode - by vent - 18.09.2011, 19:41
Re: My basic & clean RP gamemode - by BigAl - 22.09.2011, 16:37
Re: My basic & clean RP gamemode - by bgtracker - 23.09.2011, 07:31

Forum Jump:


Users browsing this thread: 2 Guest(s)