Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:savehouse(playerid,params[])
- {
- if(IsPlayerAdmin(playerid))
- {
- new Float:X, Float:Y, Float:Z;
- new I;
- GetPlayerPos(playerid, X, Y, Z);
- I = GetPlayerInterior(playerid);
- new comment[128];
- sscanf(params,"S("//")[128],comment))
- new File: fileid = fopen(SAVED_HOUSES_FILE, io_append);
- if(fileid)
- {
- new string[256];
- format(string, 256, "CreateHouse(%.2f, %.2f, %.2f, interiorX, interiorY, interiorZ, price, interior, %d, virtualworld); // %s\r\n", X, Y, Z, I, comment);
- fwrite(fileid, string);
- fclose(fileid);
- FS_MsgBox(playerid, "{33AA33}SUCCESS", "The house has been saved to \""SAVED_HOUSES_FILE"\"");
- }
- else FS_MsgBox(playerid, BOX_STYLE_ERROR, "An error has occurred! Maybe the directory doesn't exist.");
- return 1;
- }
- return 1;
- }
- CMD:savebiz(playerid,params[]) return cmd_savestore(playerid,params);
- CMD:saveshop(playerid,params[]) return cmd_savestore(playerid,params);
- CMD:savestore(playerid,params[])
- {
- if(IsPlayerAdmin(playerid))
- {
- new Float:X, Float:Y, Float:Z;
- new I;
- GetPlayerPos(playerid, X, Y, Z);
- I = GetPlayerInterior(playerid);
- new comment[128];
- sscanf(params,"S("//")[128],comment))
- new File: fileid = fopen(SAVED_SHOPS_FILE, io_append);
- if(fileid)
- {
- new string[256];
- format(string, 256, "CreateBusiness(title, earning, %.2f, %.2f, %.2f, interiorX, interiorY, interiorZ, price, interior, %d, virtualworld, iconmarker, item_list[]); // %s\r\n", X, Y, Z, I, comment);
- fwrite(fileid, string);
- fclose(fileid);
- FS_MsgBox(playerid, "{33AA33}SUCCESS", "The store has been saved to \""SAVED_SHOPS_FILE"\"");
- }
- else FS_MsgBox(playerid, BOX_STYLE_ERROR, "An error has occurred! Maybe the directory doesn't exist.");
- return 1;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment