Jump to content
  • 0

Server Shuting Down


Bladex

Question

4 answers to this question

Recommended Posts

[pawn] if(strcmp(cmd, "/buybiz", true) == 0)

{

    if(IsPlayerConnected(playerid))

{

new Float:oldposx, Float:oldposy, Float:oldposz;

GetPlayerName(playerid, playername, sizeof(playername));

GetPlayerPos(playerid, oldposx, oldposy, oldposz);

if(PlayerInfo[playerid][pPbiskey] != 255)

{

SendClientMessage(playerid, COLOR_WHITE, "  You already own a business, type /sellbiz if you want to buy this one.");

return 1;

}

for(new b = 0; b < sizeof(SBizzInfo); b++)

{

if(PlayerToPoint(2.0, playerid, SBizzInfo[sbEntranceX], SBizzInfo[sbEntranceY], SBizzInfo[sbEntranceZ]) && SBizzInfo[sbOwned] == 0)

{

if(PlayerInfo[playerid][pLevel] < SBizzInfo[sbLevelNeeded])

{

format(string, sizeof(string), "You Must Be Level %d To Purchase This",SBizzInfo[sbLevelNeeded]);

SendClientMessage(playerid, COLOR_GRAD5, string);

return 1;

}

if(GetPlayerMoney(playerid) > SBizzInfo[sbBuyPrice])

{

                        Delete3DTextLabel(Text3D:sbizsale);

PlayerInfo[playerid][pPbiskey] = b+100;

SBizzInfo[sbOwned] = 1;

GetPlayerName(playerid, sendername, sizeof(sendername));

strmid(SBizzInfo[sbOwner], sendername, 0, strlen(sendername), 255);

GivePlayerMoney(playerid,-SBizzInfo[sbBuyPrice]);

PlayerPlayMusic(playerid);

SendClientMessage(playerid, COLOR_WHITE, "Congratulations, On Your New Purchase.");

SendClientMessage(playerid, COLOR_WHITE, "Type /help to review the new business help section.");

                        Delete3DTextLabel(Text3D:sbizsale);

DateProp(playerid);

OnPropUpdate();

OnPlayerUpdate(playerid);

return 1;

}

else

{

SendClientMessage(playerid, COLOR_WHITE, "You don't have the cash for that");

return 1;

}

}

}

for(new b = 0; b < sizeof(BizzInfo); b++)

{

if(PlayerToPoint(2.0, playerid, BizzInfo[bEntranceX], BizzInfo[bEntranceY], BizzInfo[bEntranceZ]) && BizzInfo[bOwned] == 0)

{

if(PlayerInfo[playerid][pLevel] < BizzInfo[bLevelNeeded])

{

format(string, sizeof(string), "You Must Be Level %d To Purchase This",BizzInfo[bLevelNeeded]);

SendClientMessage(playerid, COLOR_GRAD5, string);

return 1;

}

if(GetPlayerMoney(playerid) > BizzInfo[bBuyPrice])

{

                        Delete3DTextLabel(Text3D:bizsale);

PlayerInfo[playerid][pPbiskey] = b;

BizzInfo[bOwned] = 1;

GetPlayerName(playerid, sendername, sizeof(sendername));

strmid(BizzInfo[bOwner], sendername, 0, strlen(sendername), 255);

GivePlayerMoney(playerid,-BizzInfo[bBuyPrice]);

PlayerPlayMusic(playerid);

SetPlayerInterior(playerid,BizzInfo[bInterior]);

PlayerInfo[playerid][pInt] = BizzInfo[bInterior];

SetPlayerPos(playerid,BizzInfo[bExitX],BizzInfo[bExitY],BizzInfo[bExitZ]);

GameTextForPlayer(playerid, "~w~Bun venit ~n~You can exit at any time by moving to this door and typing /exit", 5000, 3);

PlayerInfo[playerid][pInt] = BizzInfo[bInterior];

PlayerInfo[playerid][pLocal] = b ;

SendClientMessage(playerid, COLOR_WHITE, "Congratulations, On Your New Purchase.");

SendClientMessage(playerid, COLOR_WHITE, "Type 4 to review the new business help section.");

Delete3DTextLabel(Text3D:bizsale);

                        DateProp(playerid);

OnPropUpdate();

OnPlayerUpdate(playerid);

return 1;

}

else

{

SendClientMessage(playerid, COLOR_WHITE, "You don't have the cash for that");

return 1;

}

}

}

}

return 1;

}[/pawn]

[pawn] if(strcmp(cmd, "/asellhouse", true) == 0)

{

    if(IsPlayerConnected(playerid))

{

GetPlayerName(playerid, playername, sizeof(playername));

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /asellhouse [houseid]");

return 1;

}

new house = strval(tmp);

if (PlayerInfo[playerid][pAdmin] >= 6)

{

HouseInfo[house][hHel] = 0;

HouseInfo[house][hArm] = 0;

HouseInfo[house][hHealthx] = 0;

HouseInfo[house][hHealthy] = 0;

HouseInfo[house][hHealthz] = 0;

HouseInfo[house][hArmourx] = 0;

HouseInfo[house][hArmoury] = 0;

HouseInfo[house][hArmourz] = 0;

HouseInfo[house][hLock] = 1;

HouseInfo[house][hOwned] = 0;

HouseInfo[house][hVec] = 418;

HouseInfo[house][hVcol1] = -1;

HouseInfo[house][hVcol2] = -1;

strmid(HouseInfo[house][hOwner], "The State", 0, strlen("The State"), 255);

PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);

format(string, sizeof(string), "~w~You have sold this property", HouseInfo[house][hValue]);

GameTextForPlayer(playerid, string, 10000, 3);

housesale = Create3DTextLabel(string,0x006400FF,HouseInfo[house][hEntrancex], HouseInfo[house][hEntrancey], HouseInfo[house][hEntrancez]+1,15,0,1);

for(new i = 0; i < sizeof(HouseInfo); i++)

format(string, sizeof(string), "[WARNING]: %s a vandut casa cu numarul %d.", sendername, i);

OnPropUpdate();

return 1;

}

else

{

SendClientMessage(playerid, COLOR_WHITE, "Nu esti Admin!.");

}

}

return 1;

}[/pawn]

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.