15.01.2013, 12:58
how i can make this into r7 ??
and who i can also make this ?
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
format(MySql_Query,sizeof(MySql_Query),"SELECT * FROM `playerdata` WHERE `name`='%s'",PlayerName(playerid));
mysql_query(MySql_Query);
if(mysql_num_rows() != 0 && !PLAYERLIST_authed[playerid])
{
ShowPlayerDialog(playerid,log,DIALOG_STYLE_INPUT,"{008000}Login","{FFFFFF}This Playername is {008000}Registered.\n{FFFFFF}Please enter password below to login","Login","Quit");
return 0;
}
if(!mysql_num_rows() && !PLAYERLIST_reg[playerid])
{
ShowPlayerDialog(playerid,reg,DIALOG_STYLE_INPUT,"{FF0000}Registeration","{FFFFFF}This Playername is {FF0000}not Registered.\n{FFFFFF}Please enter password below to register","Register","Quit");
return 0;
}
return 1;
}
and who i can also make this ?
pawn Код:
switch(listitem)
{
case 0:{
format(MySql_Query,sizeof(MySql_Query),"SELECT `bankcash` FROM `playerdata` WHERE name='%s'",PlayerName(playerid));
mysql_query(MySql_Query);
mysql_store_result();
new pname[30];
GetPlayerName(playerid,pname,30);
format(str, sizeof(str), "|_|----- City Bank -----|_|");
format(str2, sizeof(str1), "|** Mode: Account Statement");
format(str3, sizeof(str2), "|** Account Holder: %s",pname);
format(str3, sizeof(str3), "|** Current Balance: $%d",BankCash[playerid]);
format(str4, sizeof(str4), "|** Bank Opening Hours: 8:00 - 21:00");
format(str5, sizeof(str5), "|** 24h ATM machines. /atmloc");
format(str6, sizeof(str6), "|_|-------------------------------------------|_|");
format(mstring,sizeof(mstring),"%s\n%s\n%s\n%s\n%s\n%s\n%s",str,str1,str2,str3,str4,str5,str6);
ShowPlayerDialog(playerid,bankstats,DIALOG_STYLE_MSGBOX,"Your Bank Statement",mstring,"OK","");
mysql_free_result();
}