13.01.2013, 23:18
pawn Код:
stock MySql_Login(playerid)
{
new pname[24], savingstring[20];
new MySql_QueryLogin[500];
GetPlayerName(playerid, pname, 24);
format(MySql_QueryLogin, sizeof(MySql_QueryLogin), "SELECT * FROM `playerdata` WHERE `name` = '%s'", PlayerName(playerid));
mysql_query(MySql_QueryLogin);
mysql_store_result();
while(mysql_fetch_row(MySql_QueryLogin))
{
sscanf(savingstring,"p<|>ddddddddddddddddddddddddddddddddddddddddddddddd",
SafeGivePlayerMoney(playerid,strval(savingstring)),
SetPlayerScore(playerid,strval(savingstring)),
robberrank[playerid],
Jailed[playerid],
JailTime[playerid],
raperrank[playerid],
arrestranks[playerid],
swatranks[playerid],
copranks[playerid],
pvtlaw[playerid],
armyranks[playerid],
tazerank[playerid],
hitmanranks[playerid],
takesdownranks[playerid],
weapondealer[playerid],
itemsdealer[playerid],
medic[playerid],
mechanic[playerid],
CanUseArmy[playerid],
CanUseSwat[playerid],
SwatCommander[playerid],
ArmyCommander[playerid],
PlayerAdminLevel[playerid],
AccountLocked[playerid],
HasWallet[playerid],
HasCrock[playerid],
HasDrugBag[playerid],
PlayerDrugs[playerid],
BankCash[playerid],
AirPortOwner[playerid],
BoatOwner[playerid],
SFBoatOwner[playerid],
DrugHouseOwner[playerid],
grottiowner[playerid],
autobahnowner[playerid],
uttoautoowner[playerid],
couttowner[playerid],
wangsowner[playerid],
BankRobInsurance[playerid],
Warnings[playerid],
IRCWarnings[playerid],
RegAsAdmin[playerid],
KickWarn[playerid],
HaveBlunts[playerid],
PlayerInjections[playerid],
HaveWine[playerid],
LockingPick[playerid]);
SystemMsg(playerid,"You are now logged in. Your stats will be auto-saved when you disconnect");
PLAYERLIST_authed[playerid]=true;
}
mysql_free_result();
return 1;
}
![Sad](images/smilies/sad.gif)