if(strcmp(cmdtext, "/enter", true) == 0) { if(GetPlayerWantedLevel(playerid) >= 1) { if PlayerToPoint(5,playerid,999.2678,-919.9958,42.1797) { SetPlayerPos(playerid,-27.312299,-29.277599,1003.557250); SetPlayerInterior(playerid,4); PlayerInfo[playerid][pInt] = 4; GameTextForPlayer(playerid, "~h~24/7", 5000, 1); return 1; } else { GameTextForPlayer(playerid, "~r~Criminals can't hide in here!", 5000, 1); return 1; } } }
if(strcmp(cmdtext, "/enter", true) == 0)
{
if(GetPlayerWantedLevel(playerid) < 1 && IsPlayerInRangeOfPoint(playerid, 5.0,999.2678,-919.9958,42.1797))
{
SetPlayerPos(playerid,-27.312299,-29.277599,1003.557250);
SetPlayerInterior(playerid,4);
PlayerInfo[playerid][pInt] = 4;
GameTextForPlayer(playerid, "~h~24/7", 5000, 1);
}
else { GameTextForPlayer(playerid, "~r~Criminals can't hide in here!", 5000, 1); }
return 1;
}
if(strcmp(cmd, "/enter", 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])) { //printf("Found House :%d",i); if(PlayerInfo[playerid][pPhousekey] == i || HouseInfo[i][hLock] == 0) { if(GetPlayerWantedLevel(playerid) < 1) { SetPlayerInterior(playerid,HouseInfo[i][hInt]); SetPlayerPos(playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]); GameTextForPlayer(playerid, "~w~Welcome Home", 5000, 1); PlayerInfo[playerid][pInt] = HouseInfo[i][hInt]; PlayerInfo[playerid][pLocal] = i; } else { GameTextForPlayer(playerid, "~r~Criminals can't hide in houses!", 5000, 1); return 1; } } else { GameTextForPlayer(playerid, "~r~Locked", 5000, 1); return 1; } } } for(new i = 0; i < sizeof(BizzInfo); i++) { if (PlayerToPoint(3, playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ])) { //printf("Found House :%d",i); if(!IsACop(playerid) && i == 3) { SendClientMessage(playerid, COLOR_GREY, " Cops only !"); return 1; } if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerCash(playerid) >= BizzInfo[i][bEntranceCost]) { if(GetPlayerWantedLevel(playerid) < 1) { if(PlayerInfo[playerid][pPbiskey] != i) { if(BizzInfo[i][bLocked] == 1) { GameTextForPlayer(playerid, "~r~Closed", 5000, 1); return 1; } if(BizzInfo[i][bProducts] == 0) { GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1); return 1; } GivePlayerCash(playerid,-BizzInfo[i][bEntranceCost]); format(string, sizeof(string), "~r~-$%d~n~~w~type /exit~n~to get out", BizzInfo[i][bEntranceCost]); BizzInfo[i][bTill] += BizzInfo[i][bEntranceCost]; ExtortionBiz(i, BizzInfo[i][bEntranceCost]); BizzInfo[i][bProducts]--; OnPropUpdate(); GameTextForPlayer(playerid, string, 5000, 3); } SetPlayerInterior(playerid,BizzInfo[i][bInterior]); SetPlayerPos(playerid,BizzInfo[i][bExitX],BizzInfo[i][bExitY],BizzInfo[i][bExitZ]); PlayerInfo[playerid][pInt] = BizzInfo[i][bInterior]; PlayerInfo[playerid][pLocal] = i+99; new dood[MAX_PLAYER_NAME]; GetPlayerName(playerid, dood, sizeof(dood)); format(string, sizeof(string), "%s payed $%d to enter biz %d", dood, BizzInfo[i][bEntranceCost], i); printf("%s", string); PayLog(string); //PlayerInfo[playerid][pLocal] = i; } else { GameTextForPlayer(playerid, "~r~You dont have the cash", 5000, 1); } } else { GameTextForPlayer(playerid, "~r~Criminals can't hide in houses!", 5000, 1); return 1; } } }
if(GetPlayerWantedLevel(playerid) < 1 && IsPlayerInRangeOfPoint(playerid, 5.0,999.2678,-919.9958,42.1797))
{
SetPlayerPos(playerid,-27.312299,-29.277599,1003.557250);
SetPlayerInterior(playerid,4);
PlayerInfo[playerid][pInt] = 4;
GameTextForPlayer(playerid, "~h~24/7", 5000, 1);
}
else { GameTextForPlayer(playerid, "~r~Criminals can't hide in here!", 5000, 1); }
PHP код:
|
if(strcmp(cmd, "/enter", 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])) { //printf("Found House :%d",i); if(PlayerInfo[playerid][pPhousekey] == i || HouseInfo[i][hLock] == 0) { if(GetPlayerWantedLevel(playerid) < 1) { SetPlayerInterior(playerid,HouseInfo[i][hInt]); SetPlayerPos(playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]); GameTextForPlayer(playerid, "~w~Welcome Home", 5000, 1); PlayerInfo[playerid][pInt] = HouseInfo[i][hInt]; PlayerInfo[playerid][pLocal] = i; } else { GameTextForPlayer(playerid, "~r~Criminals can't hide in houses!", 5000, 1); return 1; } } else { GameTextForPlayer(playerid, "~r~Locked", 5000, 1); return 1; } } } for(new i = 0; i < sizeof(BizzInfo); i++) { if (PlayerToPoint(3, playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ])) { //printf("Found House :%d",i); if(!IsACop(playerid) && i == 3) { SendClientMessage(playerid, COLOR_GREY, " Cops only !"); return 1; } if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerCash(playerid) >= BizzInfo[i][bEntranceCost]) { if(GetPlayerWantedLevel(playerid) < 1) { if(PlayerInfo[playerid][pPbiskey] != i) { if(BizzInfo[i][bLocked] == 1) { GameTextForPlayer(playerid, "~r~Closed", 5000, 1); return 1; } if(BizzInfo[i][bProducts] == 0) { GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1); return 1; } GivePlayerCash(playerid,-BizzInfo[i][bEntranceCost]); format(string, sizeof(string), "~r~-$%d~n~~w~type /exit~n~to get out", BizzInfo[i][bEntranceCost]); BizzInfo[i][bTill] += BizzInfo[i][bEntranceCost]; ExtortionBiz(i, BizzInfo[i][bEntranceCost]); BizzInfo[i][bProducts]--; OnPropUpdate(); GameTextForPlayer(playerid, string, 5000, 3); } SetPlayerInterior(playerid,BizzInfo[i][bInterior]); SetPlayerPos(playerid,BizzInfo[i][bExitX],BizzInfo[i][bExitY],BizzInfo[i][bExitZ]); PlayerInfo[playerid][pInt] = BizzInfo[i][bInterior]; PlayerInfo[playerid][pLocal] = i+99; new dood[MAX_PLAYER_NAME]; GetPlayerName(playerid, dood, sizeof(dood)); format(string, sizeof(string), "%s payed $%d to enter biz %d", dood, BizzInfo[i][bEntranceCost], i); printf("%s", string); PayLog(string); //PlayerInfo[playerid][pLocal] = i; } else { GameTextForPlayer(playerid, "~r~You dont have the cash", 5000, 1); } } else { GameTextForPlayer(playerid, "~r~Criminals can't hide in houses!", 5000, 1); return 1; } } }
if(GetPlayerWantedLevel(playerid) > 0) return SendClientMessage(playerid, 0xFF0000FF, "You're wanted by police and can't get into into any home.");
if(strcmp(cmd, "/enter", true) == 0) { if(IsPlayerConnected(playerid)) { for(new i = 0; i < sizeof(HouseInfo); i++) { if(GetPlayerWantedLevel(playerid) > 0) return SendClientMessage(playerid, 0xFF0000FF, "You're wanted by police and can't get into into any home."); { if (PlayerToPoint(3, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez])) { //printf("Found House :%d",i); if(PlayerInfo[playerid][pPhousekey] == i || HouseInfo[i][hLock] == 0) { SetPlayerInterior(playerid,HouseInfo[i][hInt]); SetPlayerPos(playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]); GameTextForPlayer(playerid, "~w~Welcome Home", 5000, 1); PlayerInfo[playerid][pInt] = HouseInfo[i][hInt]; PlayerInfo[playerid][pLocal] = i; } else { GameTextForPlayer(playerid, "~r~Locked", 5000, 1); } } } } for(new i = 0; i < sizeof(BizzInfo); i++) { if(GetPlayerWantedLevel(playerid) > 0) return SendClientMessage(playerid, 0xFF0000FF, "You're wanted by police and can't get into into any home."); { if (PlayerToPoint(3, playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ])) { //printf("Found House :%d",i); if(!IsACop(playerid) && i == 3) { SendClientMessage(playerid, COLOR_GREY, " Cops only !"); return 1; } if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerMoney(playerid) >= BizzInfo[i][bEntranceCost]) { if(PlayerInfo[playerid][pPbiskey] != i) { if(BizzInfo[i][bLocked] == 1) { GameTextForPlayer(playerid, "~r~Closed", 5000, 1); return 1; } if(BizzInfo[i][bProducts] == 0) { GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1); return 1; } GivePlayerMoney(playerid,-BizzInfo[i][bEntranceCost]); format(string, sizeof(string), "~r~-$%d~n~~w~type /exit~n~to get out", BizzInfo[i][bEntranceCost]); BizzInfo[i][bTill] += BizzInfo[i][bEntranceCost]; ExtortionBiz(i, BizzInfo[i][bEntranceCost]); BizzInfo[i][bProducts]--; OnPropUpdate(); GameTextForPlayer(playerid, string, 5000, 3); } SetPlayerInterior(playerid,BizzInfo[i][bInterior]); SetPlayerPos(playerid,BizzInfo[i][bExitX],BizzInfo[i][bExitY],BizzInfo[i][bExitZ]); PlayerInfo[playerid][pInt] = BizzInfo[i][bInterior]; PlayerInfo[playerid][pLocal] = i+99; new dood[MAX_PLAYER_NAME]; GetPlayerName(playerid, dood, sizeof(dood)); format(string, sizeof(string), "%s payed $%d to enter biz %d", dood, BizzInfo[i][bEntranceCost], i); printf("%s", string); PayLog(string); //PlayerInfo[playerid][pLocal] = i; } else { GameTextForPlayer(playerid, "~r~You dont have the cash", 5000, 1); } } } }