Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function LoadStuffs() {
- if(cache_num_rows() > 0) {
- cache_get_field_content_int(0, "Tax", Tax);
- cache_get_field_content_int(0, "TaxValue", TaxValue);
- cache_get_field_content_int(0, "MaxPlayers", MaxPlayers);
- cache_get_field_content(0, "MaxPlayersDate", MaxPlayersDate, 32);
- cache_get_field_content(0, "StaffMotd", StaffMotd, 64);
- cache_get_field_content_int(0, "goal", ServerGoal);
- cache_get_field_content_int(0, "GiftMoney", GiftMoney);
- cache_get_field_content_int(0, "GiftRP", GiftRP);
- cache_get_field_content_int(0, "GiftGold", GiftGold);
- cache_get_field_content_int(0, "GiftVehicle", GiftVehicle);
- new stocks[30];
- cache_get_field_content(0, "ServerStock", stocks);
- sscanf(stocks, "p<|>iiiii", ServerStock[0], ServerStock[1], ServerStock[2], ServerStock[3], ServerStock[4]);
- if(ServerGoal >= MAXGOAL) TerminatJobGoal = 1;
- gString[0] = EOS;
- format(gString, sizeof(gString), "{597F9C}(Stock: %d)\n{20F5F1}Vehicle Crate{FFFFFF}\nUse {20F5F1}/buycrate{FFFFFF} to buy crate\n{FFFFFF}Crate Price: {20F5F1}7000 RPoints {FFFFFF} / {20F5F1}700 Premium Points", ServerStock[1]);
- LabelCrates = CreateDynamic3DTextLabel(gString, 0xFFFFFFFF, 144.2511,-1945.6802,3.7734, 30.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 100.0);
- UpdateGift();
- printf("Stuff Loaded");
- }
- }
- function UpdateGift() {
- if(SpecialWeek == 0) return 1;
- new string[500];
- format(string, sizeof(string), "DarkNight RPG Giftbox (/getgift)\nBani castigati: {FC6A6A}$%s{FFFFFF}\nRP-uri castigate: {FC6A6A}%s{FFFFFF}\nPuncte premium castigate: {FC6A6A}%s{FFFFFF}\nVehicule castigate: {FC6A6A}%s{FFFFFF}", FormatNumber(GiftMoney), FormatNumber(GiftRP), FormatNumber(GiftGold), FormatNumber(GiftVehicle));
- UpdateDynamic3DTextLabelText(GiftText, -1, string);
- new query[256];
- format(query, sizeof(query), "UPDATE `stuff` SET `GiftMoney`='%d', `GiftRP`='%d', `GiftGold`='%d', `GiftLevel`='%d', `GiftFP`='%d', `GiftVehicle`='%d'", GiftMoney, GiftRP, GiftGold, GiftLevel, GiftFP, GiftVehicle);
- mysql_tquery(SQL, query, "", "");
- return true;
- }
- public OnGameModeExit() {
- DestroyActor(SpawnActor);
- DestroyActor(ActorJail);
- DestroyActor(ActorJail2);
- DestroyActor(ActorJail3);
- DestroyActor(ActorJail4);
- DestroyActor(ActorJail5);
- DestroyActor(ActorGun);
- DestroyActor(ActorLicente);
- DestroyActor(ActorMagazin);
- DestroyActor(ActorSexShop);
- gQuery[0] = EOS;
- mysql_format(SQL, gQuery, sizeof(gQuery), "UPDATE `stuff` SET `goal`='%d'", ServerGoal);
- mysql_tquery(SQL, gQuery, "", "");
- save_stock();
- return true;
- }
- save_stock() {
- gQuery[0] = EOS;
- mysql_format(SQL, gQuery, sizeof(gQuery), "UPDATE `stuff` SET `ServerStock`='%d|%d|%d|%d|%d' WHERE `ID`='1'", ServerStock[0], ServerStock[1], ServerStock[2], ServerStock[3], ServerStock[4]);
- mysql_tquery(SQL, gQuery, "", "");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement