16.06.2011, 14:20
pawn Код:
public Dinheiro(playerid)
{
//grana
CheckMySQL();
new grana;
GetPlayerName(playerid, UserStats[playerid][Name], MAX_PLAYER_NAME);
new gr[128];
format(gr, sizeof(gr), "SELECT * FROM Users WHERE Name = '%s'", UserStats[playerid][Name]);
mysql_query(gr);
mysql_store_result();
mysql_retrieve_row();
new ret[256];
mysql_get_field("dinheiro", ret);
grana = strval(ret);
//grana
new str[128];
format(str, sizeof(str), "~g~R$:~w~%d,00", grana);
Grana = TextDrawCreate(497.000000, 118.000000,str);
TextDrawBackgroundColor(Grana, 255);
TextDrawFont(Grana, 1);
TextDrawLetterSize(Grana, 0.509999, 2.100000);
TextDrawColor(Grana, -1);
TextDrawSetOutline(Grana, 1);
TextDrawSetProportional(Grana, 0);
for(new i; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
TextDrawHideForPlayer(i, Grana);
TextDrawShowForPlayer(i, Grana);
}
}
return 1;
}