CMD:verbanco(playerid, params[])
{
new Name[40], String[128], StringContas[128];
GetPlayerName(playerid, Name, sizeof(Name));
if(APlayerData[playerid][PlayerLevel] < 5) return SendClientMessage(playerid, -1, "{FF0000}Vocк precisa ser admin nivel 5 para usar este comando!");
if(sscanf(params, "u", playerid)) return SendClientMessage(playerid, -1, "{FF0000}Use /verbanco [ID]");
format(StringContas, sizeof(StringContas), "ServerData/Bank/%s.txt", Name);
if(!DOF2_IsSet(StringContas, "Money")) SendClientMessage(playerid, -1, "{FF0000}Nгo foi possivel ver a quantia do banco!");
format(String, sizeof(String), "%s tem \"%s\" no banco!", Name, DOF2_GetString(StringContas, "Money"));
SendClientMessage(playerid, 0x000000FF, String);
return 1;
}
format(String, sizeof(String), "%s tem \"%s\" no banco!", Name, DOF2_GetString(StringContas, "Money"));
format(String, sizeof(String), "%s tem \"%d\" no banco!", Name, DOF2_GetString(StringContas, "Money"));
Format Strings:
Placeholder Meaning
%b Inserts a number at this position in binary radix
%c Inserts a single character.
%d Inserts an integer (whole) number
%f Inserts a floating point number.
%i Inserts an integer.
%s Inserts a string.
%x Inserts a number in hexadecimal notation.
%% Inserts the literal '%'
Bom, quando executo o comando /verbanco , aparece isso: Feliphe_Mort tem "" no banco!
Devia ser assim Feliphe_Mort tem "585878" no banco! Uso o PPC_Trucking! |
CMD:verbanco(playerid, params[])
{
new Name[40], String[128];
GetPlayerName(playerid, Name, sizeof(Name));
if(APlayerData[playerid][PlayerLevel] < 5) return SendClientMessage(playerid, -1, "{FF0000}Vocк precisa ser admin nivel 5 para usar este comando!");
if(sscanf(params, "u", playerid)) return SendClientMessage(playerid, -1, "{FF0000}Use /versenha [ID]");
format(String, sizeof(String), "%s tem \"%i\" no banco!", Name, APlayerData[playerid][BankMoney]);
SendClientMessage(playerid, 0x000000FF, String);
return 1;
}