- 0
Problema /open
-
Similar Content
-
Recently Browsing 0 members
- No registered users viewing this page.
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.
Question
AndrewTG01
Ero(area / rile) / warning-(ul / urile):-
Liniile de cod / sursa / script-ul(obligatoriu):
if(strcmp(cmd, "/open", true) == 0) { if(IsPlayerConnected(playerid)) { for(new i = 0; i < sizeof(HouseInfo); i++) { if (PlayerToPoint(3, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]) || PlayerToPoint(3, playerid,HouseInfo[i][hExitx], HouseInfo[i][hExity], HouseInfo[i][hExitz]) || HouseInfo[i][hVW] == GetPlayerVirtualWorld(playerid)) { if(PlayerInfo[playerid][pPhousekey] == i) { if(HouseInfo[i][hLock] == 1) { HouseInfo[i][hLock] = 0; GameTextForPlayer(playerid, "~w~Door ~g~Unlocked", 5000, 6); PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0); return 1; } if(HouseInfo[i][hLock] == 0) { HouseInfo[i][hLock] = 1; GameTextForPlayer(playerid, "~w~Door ~r~Locked", 5000, 6); PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0); return 1; } } else { GameTextForPlayer(playerid, "~r~You Dont Have A Key", 5000, 6); return 1; } } } for(new i = 0; i < sizeof(BizzInfo); i++) { if (PlayerToPoint(3, playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]) || PlayerToPoint(3, playerid,BizzInfo[i][bExitX], BizzInfo[i][bExitY], BizzInfo[i][bExitZ]) || BizzInfo[i][bVW] == GetPlayerVirtualWorld(playerid)) { if(PlayerInfo[playerid][pPbiskey] == i) { if(BizzInfo[i][bLocked] == 1) { BizzInfo[i][bLocked] = 0; GameTextForPlayer(playerid, "~w~Bussiness ~g~Open", 5000, 6); PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0); return 1; } if(BizzInfo[i][bLocked] == 0) { BizzInfo[i][bLocked] = 1; GameTextForPlayer(playerid, "~w~Bussiness ~r~Closed", 5000, 6); PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0); return 1; } } else { GameTextForPlayer(playerid, "~r~You Dont Have A Key", 5000, 6); return 1; } } } for(new i = 0; i < sizeof(SBizzInfo); i++) { if (PlayerToPoint(3, playerid,SBizzInfo[i][sbEntranceX], SBizzInfo[i][sbEntranceY], SBizzInfo[i][sbEntranceZ])) { if(PlayerInfo[playerid][pPbiskey] == i+100) { if(SBizzInfo[i][sbLocked] == 1) { SBizzInfo[i][sbLocked] = 0; GameTextForPlayer(playerid, "~w~Bussiness ~g~Open", 5000, 6); PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0); return 1; } if(SBizzInfo[i][sbLocked] == 0) { SBizzInfo[i][sbLocked] = 1; GameTextForPlayer(playerid, "~w~Bussiness ~r~Closed", 5000, 6); PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0); return 1; } } else { GameTextForPlayer(playerid, "~r~You Dont Have A Key", 5000, 6); return 1; } } } } return 1; }if(strcmp(cmd, "/buyhouse", true) == 0) { if(IsPlayerConnected(playerid)) { new Float:oldposx, Float:oldposy, Float:oldposz; GetPlayerName(playerid, playername, sizeof(playername)); GetPlayerPos(playerid, oldposx, oldposy, oldposz); for(new h = 0; h < sizeof(HouseInfo); h++) { if(PlayerToPoint(2.0, playerid, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]) && HouseInfo[h][hOwned] == 0) { if(PlayerInfo[playerid][pLevel] < HouseInfo[h][hLevel]) { format(string, sizeof(string), " You must be Level %d to purchase this !", HouseInfo[h][hLevel]); SendClientMessage(playerid, COLOR_GRAD5, string); return 1; } if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0) { SendClientMessage(playerid, COLOR_WHITE, " You already own a house, type /sellhouse if you want to buy this one !"); return 1; } if(GetPlayerMoney(playerid) > HouseInfo[h][hValue]) { PlayerInfo[playerid][pPhousekey] = h; HouseInfo[h][hOwned] = 1; GetPlayerName(playerid, sendername, sizeof(sendername)); strmid(HouseInfo[h][hOwner], sendername, 0, strlen(sendername), 255); GivePlayerMoney(playerid,-HouseInfo[h][hValue]); PlayerPlayMusic(playerid); SetPlayerVirtualWorld(playerid,HouseInfo[h][hVW]); SetPlayerPos(playerid,HouseInfo[h][hExitx],HouseInfo[h][hExity],HouseInfo[h][hExitz]); TogglePlayerControllable(playerid,0); SetTimerEx("FreezeTimer",3000,0,"d",playerid); HouseEntered[playerid] = h; GameTextForPlayer(playerid, "~w~Welcome Home~n~You can exit at any time by moving to this door and typing /exit", 5000, 3); PlayerInfo[playerid][pLocal] = h; SendClientMessage(playerid, COLOR_WHITE, "Congratulations, on your new Purchase !"); SendClientMessage(playerid, COLOR_WHITE, "Type /help to review the new property help section !"); DateProp(playerid); OnPropUpdate(); OnPlayerUpdateEx(playerid); return 1; } else { SendClientMessage(playerid, COLOR_WHITE, " You don't have the cash for that !"); return 1; } } } } return 1; }Imagini / Video (optional): -
Ati incercat sa rezolvati singur?: Da
11 answers to this question
Recommended Posts