25.01.2014, 16:16
I miss my gamemode
Help me
PHP код:
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"Connexion/Enregistrement",""COL_RED"Vous avez mis un MOT DE PASSE incorrecte.\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,"Kills",0);
INI_WriteInt(File,"Deaths",0);
INI_WriteInt(File,"Score",0);
INI_Close(File);
SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
SendClientMessage(playerid,-1,"");
SendClientMessage(playerid,-1,"");
SendClientMessage(playerid,-1,"");
SendClientMessage(playerid,-1,"");
SendClientMessage(playerid,-1,"");
SendClientMessage(playerid,-1,"");
SendClientMessage(playerid,-1,"");
SendClientMessage(playerid,-1,"");
SendClientMessage(playerid,-1,"");
SendClientMessage(playerid,-1,"");
SendClientMessage(playerid,-1,"");
SendClientMessage(playerid,-1,"");
SendClientMessage(playerid,0xCD7D05FF,"Merci d'avoir crйer un {0080C0}compte sur notre serveur.");
SendClientMessage(playerid,0xCD7D05FF,"Votre {FF0000}PSEUDO {CD7D05}est votre {FF0000}MOT DE PASSE {CD7D05}sont enregistrer.");
SendClientMessage(playerid,0xCD7D05FF,"Bon jeux parmis nous.");
GivePlayerMoney(playerid, 1000);
}
}
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]);
SendClientMessage(playerid,-1,"");
SendClientMessage(playerid,-1,"");
SendClientMessage(playerid,-1,"");
SendClientMessage(playerid,-1,"");
SendClientMessage(playerid,-1,"");
SendClientMessage(playerid,-1,"");
SendClientMessage(playerid,-1,"");
SendClientMessage(playerid,-1,"");
SendClientMessage(playerid,-1,"");
SendClientMessage(playerid,-1,"");
SendClientMessage(playerid,-1,"");
SendClientMessage(playerid,-1,"");
SendClientMessage(playerid,0xCD7D05FF,"Vos stats ont йtй charger avec {004000}succйs !.");
}
else
{
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_RED"Vous avez mis un MOT DE PASSE incorrecte.\n"COL_WHITE"Merci de mettre votre MOT DE PASSE.","Identifier","Quitter");
}
}
return 0;