Registration problem help please.
#1

Ok this system is abit buggy dont know why.
http://s1144.photobucket.com/albums/...=sa-mp-028.png
http://s1144.photobucket.com/albums/...=sa-mp-029.png
After typing the password it should save in player data base.
http://s1144.photobucket.com/albums/...=sa-mp-030.png
There is says it is save but.
But when i press spawn nothing happen, but when i press arrow it says this
http://s1144.photobucket.com/albums/...=sa-mp-031.png
This is the registration code
PHP код:
public OnPlayerRequestClass(playerid)
{
    
SetPlayerCameraPos(playerid, -2604.2324,490.6546,68.6727);
    
SetPlayerCameraLookAt(playerid, -2381.7639,793.5422,101.3817);
    
SetPlayerPos(playerid, -2381.7639,793.5422,101.3817);
    
ClearChat(playerid);
    if(
Account[playerid] == 1)
    {
           
ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Login to your account.","Note - A account with this name was found inside the database,\n If this is your account,type in your password\n if not press cancel.","Login","Cancel");
    }
    else
    {
         
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Register your account.","Note - A account with this name was not found inside the database.\n if you would like to register this account,\n type in the password you would like to tegister with.","Register","Cancel");
    }
    return 
1;
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == 1)
    {
        if(!
strlen(inputtext))
        {
            
SendClientMessage(playerid0xFFFFFFFF"Your Password Cannot be Blank"); Kick(playerid);
            
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Register your account","Note - A Account with this name was not found inside the database\n if you would like to register this account\nType in the password you would like to register with.","Register","Cancel");
            return 
1;
        }
        if(!
response){ SendClientMessage(playerid0xFFFFFFFF"You canceled!"); Kick(playerid); return 0; }
        
//Encrypt(inputtext);
        
OnPlayerRegister(playeridinputtext);
        
PlayerPlaySound(playerid11320.00.00.0);
        
InfoBoxForPlayer(playerid"You registered now fill out the information about your character. Have fun.");
    }
     if(
dialogid == 2)
    {
        if(!
strlen(inputtext))
        {
            
SendClientMessage(playerid0xFFFFFFFF"Your Password Cannot be left Blank"); Kick(playerid);
            
ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Login to your account","Note - A account with this name was found inside the database,\n If this is your account,type in your password\n if not press cancel!","Login","Cancel");
            return 
1;
        }
        if(!
response){ SendClientMessage(playerid0xFFFFFFFF"You canceled!"); Kick(playerid); return 0; }
        
//Encrypt(inputtext);
        
OnPlayerLogin(playerid,inputtext);
    }
    if(
dialogid == 3)
    {
        if(!
strlen(inputtext))
        {
            
SendClientMessage(playerid0xFFFFFFFF"Your Age Cannot be Blank");
            
ShowPlayerDialog(playerid,3,DIALOG_STYLE_INPUT,"Age","How old are you?","Continue","Cancel");
            return 
1;
        }
        if(!
response){ Kick(playerid); PlayerInfo[playerid][pTut] = 1; return 1; }
        
//PlayerInfo[playerid][pTut] = 2;
        
if (strval(inputtext) == 0)
        {
            
SendClientMessage(playerid0xFFFFFFFF"Invalid Age.");
            
ShowPlayerDialog(playerid,3,DIALOG_STYLE_INPUT,"Age","How old are you?","Continue","Cancel");
            return 
1;
        }
        
OnAgeGiven(playeridinputtext);
        
PlayerPlaySound(playerid11320.00.00.0);
    }
    if(
dialogid == 4)
    {
          if(!
response){ ShowPlayerDialog(playerid,4,DIALOG_STYLE_LIST,"Religon","Jewish\nMuslim\nChristian\nCatholic\nIslam\nHindu\nBuddist\nAtheist","Continue","Cancel"); return 1; }
        if(
listitem == 0)
        {
            
SendClientMessage(playerid0xFFFFFFFF"Your Character is Jewish");
            
OnReligonGiven(playerid"Jewish");
        }
        if(
listitem == 1)
        {
            
SendClientMessage(playerid0xFFFFFFFF"Your Character is Muslim");
            
OnReligonGiven(playerid"Muslim");
        }
        if(
listitem == 2)
        {
            
SendClientMessage(playerid0xFFFFFFFF"Your Character is Christian");
            
OnReligonGiven(playerid"Christian");
        }
        if(
listitem == 3)
        {
            
SendClientMessage(playerid0xFFFFFFFF"Your Character is Catholic");
            
OnReligonGiven(playerid"Catholic");
        }
        if(
listitem == 4)
        {
            
SendClientMessage(playerid0xFFFFFFFF"Your Character is Islam");
            
OnReligonGiven(playerid"Islam");
        }
        if(
listitem == 5)
        {
            
SendClientMessage(playerid0xFFFFFFFF"Your Character is Hindu");
            
OnReligonGiven(playerid"Hindu");
        }
        if(
listitem == 6)
        {
            
SendClientMessage(playerid0xFFFFFFFF"Your Character is Buddist");
            
OnReligonGiven(playerid"Buddist");
        }
        if(
listitem == 7)
        {
            
SendClientMessage(playerid0xFFFFFFFF"Your Character is Atheist");
            
OnReligonGiven(playerid"Atheist");
        }
        
//PlayerInfo[playerid][pTut] = 3;
        
PlayerPlaySound(playerid11320.00.00.0);
    }
    if(
dialogid == 5)
    {
        
//new string[128];
        
if(!response){ ShowPlayerDialog(playerid,5,DIALOG_STYLE_LIST,"Where did you come from?","Los Santos\nSan Fierro\nLas Venturas","Continue","Cancel"); return 1; }
        if(
listitem == 0)
        {
            
PlayerInfo[playerid][pReg] = 20;
            
ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Login to your account","Note - A account with this name was found inside the database,\n If this is your account,type in your password\n if not press cancel!","Login","Cancel");
        }
        if(
listitem == 1)
        {
            
PlayerInfo[playerid][pReg] = 20;
            
ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Login to your account","Note - A account with this name was found inside the database,\n If this is your account,type in your password\n if not press cancel!","Login","Cancel");
        }
        if(
listitem == 2)
        {
            
PlayerInfo[playerid][pReg] = 20;
            
ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Login to your account","Note - A account with this name was found inside the database,\n If this is your account,type in your password\n if not press cancel!","Login","Cancel");
        }
        if(
listitem == 4)
        {
            
PlayerInfo[playerid][pReg] = 20;
            
ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Login to your account","Note - A account with this name was found inside the database,\n If this is your account,type in your password\n if not press cancel!","Login","Cancel");
        }
        if(
listitem == 5)
        {
            
PlayerInfo[playerid][pReg] = 20;
            
ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Login to your account","Note - A account with this name was found inside the database,\n If this is your account,type in your password\n if not press cancel!","Login","Cancel");
        }
        
PlayerInfo[playerid][pTut] = 999;
        
PlayerInfo[playerid][pReg] = 20;
        
PlayerPlaySound(playerid11320.00.00.0);
        return 
1;
      }
      if(
dialogid == 6)
    {
        if(!
strlen(inputtext))
        {
            
SendClientMessage(playerid0xFFFFFFFF"Your left your advertisement blank.");
            return 
1;
        }
        if(
response)
        {
            new 
string2[128];
            
format(string2sizeof(string2), "Ad: %s (%s)"inputtextGetPlayerNameEx(playerid));
            
SendClientMessageToAll(0x4B00B0AAstring2);
            
GivePlayerCash(playerid, -AdPrice);
            
format(string2sizeof(string2), "That Advertisement costed you $%d."AdPrice);
            
SendClientMessage(playerid0x4B00B0AAstring2);
        }
    }
    if(
dialogid == 7// Weed, Cocaine, Mushrooms. and LSD
    
{
          if(!
response){ return 1; }
        if(
listitem == 0)
        {
            if(
GetPlayerCash(playerid) >= 700)
            {
                
GivePlayerCash(playerid, -700);
                
PlayerInfo[playerid][pWeedSeeds] += 5;
                
SendClientMessage(playerid0x4B00B0AA"Info - You bought 5 Marajuana Seeds from the drug dealer!");
            }
            else
            {
                
SendClientMessage(playerid0x4B00B0AA"You need some money! [700]");
            }
        }
        if(
listitem == 1)
        {
            if(
GetPlayerCash(playerid) >= 700)
            {
                
GivePlayerCash(playerid, -700);
                
PlayerInfo[playerid][pCokeSeeds] += 5;
                
SendClientMessage(playerid0x4B00B0AA"Info - You bought 5 Cok. Seeds from the drug dealer!");
            }
            else
            {
                
SendClientMessage(playerid0x4B00B0AA"You need some money! [700]");
            }
        }
        if(
listitem == 2)
        {
            if(
GetPlayerCash(playerid) >= 700)
            {
                
GivePlayerCash(playerid, -700);
                
PlayerInfo[playerid][pShroomSeeds] += 5;
                
SendClientMessage(playerid0x4B00B0AA"Info - You bought 5 Mushroom Seeds from the drug dealer!");
            }
            else
            {
                
SendClientMessage(playerid0x4B00B0AA"You need some money! [700]");
            }
        }
        if(
listitem == 3)
        {
            if(
GetPlayerCash(playerid) >= 1000)
            {
                
GivePlayerCash(playerid, -1000);
                
PlayerInfo[playerid][pLSD] += 3;
                
SendClientMessage(playerid0x4B00B0AA"Info - You bought 3 LSDs from the drug dealer!");
            }
            else
            {
                
SendClientMessage(playerid0x4B00B0AA"You need some money! [1000]");
            }
        }
    }
    if(
dialogid == 8)
    {
          if(!
response){ RemoveDriverFromVehicle(playerid); return 1; }
          if(
engineWait[playerid] == 1)
        {
            
GameTextForPlayer(playerid"Please Wait..."30001);
            
ShowPlayerDialog(playerid,8,DIALOG_STYLE_MSGBOX,"Hotwire Vehicle","You don't have the keys to this vehicle, But this can be hotwired!","Hotwire","Cancel");
               return 
1;
        }
          if(
engine[GetPlayerVehicleID(playerid)-1] == 0)
    {
    new 
string[128];
    new 
rand random(3);
    switch(
rand)
    {
        case 
0:
        {
            
format(stringsizeof(string), "%s attempts to hotwire the vehicle, and the vehicle's engine doesnt turn on!"GetPlayerNameEx(playerid));
            
ProxDetector(20.0playeridstring,COLOR_GREEN,COLOR_GREEN,COLOR_GREEN,COLOR_GREEN,COLOR_GREEN);
            
SetTimerEx("engineW"50000"d"playerid);
            
engineWait[playerid] = 1;
            
ShowPlayerDialog(playerid,8,DIALOG_STYLE_MSGBOX,"Hotwire Vehicle","You don't have the keys to this vehicle, But this can be hotwired!","Hotwire","Cancel");
            return 
1;
        }
         case 
1:
        {
            
format(stringsizeof(string), "%s attempts to hotwire the vehicle, and the vehicle's engine doesnt turn on!"GetPlayerNameEx(playerid));
            
ProxDetector(20.0playeridstring,COLOR_GREEN,COLOR_GREEN,COLOR_GREEN,COLOR_GREEN,COLOR_GREEN);
            
SetTimerEx("engineW"50000"d"playerid);
            
engineWait[playerid] = 1;
            
ShowPlayerDialog(playerid,8,DIALOG_STYLE_MSGBOX,"Hotwire Vehicle","You don't have the keys to this vehicle, But this can be hotwired!","Hotwire","Cancel");
            return 
1;
           }
         case 
2:
        {
             
format(stringsizeof(string), "%s attempts to hotwire the vehicle, and the vehicle's engine turns on!"GetPlayerNameEx(playerid));
            
ProxDetector(20.0playeridstring,COLOR_GREEN,COLOR_GREEN,COLOR_GREEN,COLOR_GREEN,COLOR_GREEN);
            
engine[GetPlayerVehicleID(playerid)-1] = 1;
            
TogglePlayerControllable(playeridtrue);
            return 
1;
         }
         case 
3:
        {
             
format(stringsizeof(string), "%s attempts to hotwire the vehicle, and the vehicle's engine turns on!"GetPlayerNameEx(playerid));
            
ProxDetector(20.0playeridstring,COLOR_GREEN,COLOR_GREEN,COLOR_GREEN,COLOR_GREEN,COLOR_GREEN);
            
engine[GetPlayerVehicleID(playerid)-1] = 1;
            
TogglePlayerControllable(playeridtrue);
            return 
1;
         }
    }
    }
    }
    if(
dialogid == 9)
    {
        if(!
responseSendClientMessage(playerid0xFFFFFFFF"You canceled!");
        new 
message[196];
        
format(messagesizeof(message), "Firefox - Loading %s........"inputtext);
        
SendClientMessage(playerid0xFFFFFFFFmessage);
        new 
randMSG random(sizeof(RandomMSG));
        
SendClientMessage(playerid0xFFFFFFFFRandomMSG[randMSG]);
        new 
Rand random(1);
        switch(
Rand)
        {
            case 
0:
            {
                  
PlayerInfo[playerid][pVirus] = 1;
            }
            case 
1:
            {
            
            }
        }
        return 
1;
    } 
Please kindly help me and spot my mistake for me.
Reply
#2

bump anyone?
Reply
#3

second last bump. anyone can help me please?
Reply
#4

Last bump anyone please help i try alot of things. but it just fail.
Reply
#5

how the shit cant kiddys wait and stop bumping theards like he are the best ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)