- 0
Problema Cum sa rezolv?
-
Similar Content
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
Pinki95
Vreau ca in loc sa scri /bank sa fie un pickup:
[pawn]COMMAND:bank(playerid, params[])
{
// Setup local variables
new file[100], Name[24];
// Send the command to all admins so they can see it
SendAdminText(playerid, "/bank", params);
// Get the playername
format(Name, sizeof(Name), APlayerData[playerid][PlayerName]);
// Construct the complete filename for this player's bank-account
format(file, sizeof(file), BankFile, Name);
// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{
// Check if the player doesn't have a bank account
if (!fexist(file))
{
// Ask for a password to setup his bank account
ShowPlayerDialog(playerid, DialogBankPasswordRegister, DIALOG_STYLE_INPUT, "Enter password", "Please enter a password to register your bank account:", TXT_DialogButtonSelect, TXT_DialogButtonCancel);
}
else // The player has a bank account
{
// If the player hasn't logged in to his bank account yet
if (APlayerData[playerid][bankLoggedIn] == false)
{
// Ask for the password to login to his bank account
ShowPlayerDialog(playerid, DialogBankPasswordLogin, DIALOG_STYLE_INPUT, "Enter password", "Please enter your password to login to your bank account:", TXT_DialogButtonSelect, TXT_DialogButtonCancel);
}
else // The player has logged in to his bank account already
{
// Show the main bank menu dialog
ShowBankMenu(playerid);
}
}
}
else
return 0;
// Let the server know that this was a valid command
return 1;
}[/pawn]
1 answer to this question
Recommended Posts