Hmmmm let me thing ..... stil thinking wait ... i thing i know WE NEEED CODE TO HELP YOU
|
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, "Server Account",""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,"Helper",0);
INI_WriteInt(File,"Deaths",0);
INI_WriteInt(File,"PlayerLogged",0);
INI_WriteInt(File,"Muted",0);
INI_WriteInt(File,"Kicks",0);
INI_WriteInt(File,"Jails",0);
INI_WriteInt(File,"Warnings",0);
INI_WriteInt(File,"Jailed",0);
INI_WriteInt(File,"AHide",0);
INI_WriteInt(File,"AdminDuty",0);
INI_WriteInt(File,"HelperDuty",0);
INI_WriteInt(File,"Reported",0);
INI_WriteInt(File,"Weapons",0);
INI_WriteInt(File,"Spectate",0);
INI_WriteInt(File,"Registered",0);
INI_WriteInt(File,"Model",0);
INI_WriteInt(File,"Member",0);
INI_WriteInt(File,"AdmName", 0);
INI_WriteInt(File,"HelName", 0);
INI_WriteInt(File,"SkinUsed", 0);
INI_WriteInt(File,"Kills", 0);
INI_WriteInt(File,"HelpMe", 0);
INI_WriteInt(File,"DesertEagleKills", 0);
INI_WriteInt(File,"MarkX", 0);
INI_WriteInt(File,"MarkY", 0);
INI_WriteInt(File,"MarkZ", 0);
INI_WriteInt(File,"Donator", 0);
INI_WriteInt(File,"FightStyle", 0);
INI_Close(File);
SendClientMessage(playerid,COLOR_RED,"SERVER: Reconnect to the server now");
Kick(playerid);
}
}
case DIALOG_LOGIN:
{
new skin = PlayerInfo[playerid][pModel];
new string[128];
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]);
PlayerInfo[playerid][pPlayerLogged] = 1;
format(string, sizeof(string), "~w~Welcome ~n~~w~%s!", GetName(playerid));
GameTextForPlayer(playerid, string, 2000, 1);
SetPlayerInterior(playerid, 5);
new Random = random(sizeof(RandomSpawns));
SetSpawnInfo(playerid, 1, skin, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2], RandomSpawns[Random][3], 4, 1, 24, 500, 0, 0);
SpawnPlayer(playerid);
SetPlayerSkin(playerid, skin);
SendClientMessage(playerid,COLOR_WHITE,"SERVER: You have logged into your account.");
SendClientMessage(playerid,COLOR_WHITE,"______________________________________________");
SendClientMessage(playerid,COLOR_WHITE," ");
format(string, sizeof(string), "Script Version: %s", SCRIPT_MODE);
SendClientMessage(playerid,COLOR_FADE,string);
format(string, sizeof(string), "Last Update: %s", SCRIPT_UPDATE);
SendClientMessage(playerid,COLOR_FADE,string);
format(string, sizeof(string), "Website: %s", SCRIPT_WEB);
SendClientMessage(playerid,COLOR_FADE,string);
format(string, sizeof(string), "Ventrilo: %s", SCRIPT_VENT);
SendClientMessage(playerid,COLOR_FADE,string);
SendClientMessage(playerid,COLOR_WHITE,"______________________________________________");
if(PlayerInfo[playerid][pMember] >= 10)
{
SetPlayerColor(playerid, COLOR_LIGHTRED);
}
if(PlayerInfo[playerid][pBanned] == 1)
{
SendClientMessage(playerid, COLOR_LIGHTRED, "INFO: This account is currently locked");
SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER: You have been IP banned for attempting to ban evade");
SendClientMessage(playerid, COLOR_WHITE, "MESSAGE: If you feel this ban is wrong, please post a ban appeal at OSRP.com");
Ban(playerid);
}
if(PlayerInfo[playerid][pSkinUsed] == 0)
{
SendClientMessage(playerid, COLOR_FADE, "SERVER: You are required to use /skin in order to have a specific skin");
TogglePlayerControllable(playerid, false);
}
}
else
{
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Server Account",""COL_RED"You have entered an incorrect password.\n"COL_WHITE"Type your password below to login.","Login","Quit");
}
return 1;
}
}
Create your own gamemode, and you will learn alot more than ripping of others
|