03.07.2012, 16:36
pawn Код:
for(new h = 0; h < sizeof(BizzInfo); h++)
{
if(PlayerToPoint(2.0, i, BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ]))
{
if(BizzInfo[h][bOwned] == 1)
{
format(string, sizeof(string), "~b~SHOP:~w~%s~b~~n~OWNER:~w~%s~n~~b~VALUE:~w~ $%d",BizzInfo[h][bMessage],BizzInfo[h][bOwner],BizzInfo[h][bEntranceCost]);
}
else
{
format(string, sizeof(string), "~w~%s~w~~n~This Business is for sale~n~Cost: ~g~$%d ~w~Level : %d ~n~~b~ /buybiz ~w~to buy this Business",BizzInfo[h][bMessage],BizzInfo[h][bBuyPrice],BizzInfo[h][bLevelNeeded]);
}
InfoBoxForPlayer(i, string);
SendDebugMessage("CustomPickups, BizzInfo");
}
}
for(new h = 0; h < sizeof(IntInfo); h++)
{
if(PlayerToPoint(2.0, i, IntInfo[h][iEntrancex], IntInfo[h][iEntrancey], IntInfo[h][iEntrancez]))
{
format(string, sizeof(string), "~r~%s~n~~w~TYPE~b~ /enter TO GO INSIDE",IntInfo[h][iDiscription]);
InfoBoxForPlayer(i, string);
SendDebugMessage("CustomPickups, IntInfo");
}
}
for(new h = 0; h < sizeof(FamilyInfo); h++)
{
if(PlayerToPoint(2.0, i, FamilyInfo[h][FamilySpawn][0],FamilyInfo[h][FamilySpawn][1],FamilyInfo[h][FamilySpawn][2]))
{
if(PlayerInfo[i][pMember] != h && FamilyInfo[h][FamilyLocked] == 1)
{
InfoBoxForPlayer(i, "~r~Locked!");
}
else
{
format(string, sizeof(string), "~y~Faction: %s~n~~w~TYPE~b~ /enter TO GO INSIDE", FamilyInfo[h][FamilyName]);
InfoBoxForPlayer(i, string);
SendDebugMessage("CustomPickups, FamilyInfo");
}
}
}
for(new h = 0; h < sizeof(ATMs); h++)
{
if(PlayerToPoint(2.0, i, ATMs[h][0], ATMs[h][1], ATMs[h][2]))
{
InfoBoxForPlayer(i, "~b~/CARD~w~TO ACCESS THE ATM");
}
}
for(new h = 0; h < sizeof(Dealerships); h++)
{
if(PlayerToPoint(2.0, i, Dealerships[h][0], Dealerships[h][1], Dealerships[h][2]))
{
InfoBoxForPlayer(i, "~b~Business:~w~Dealership~n~~y~/V BUY TO ACCESS THE VEHICLES");
}
}
}
if (IsAtPGarbage(i))
{
GameTextForPlayer(i, "~w~ Pick Garbage ~n~~r~ Press C", 5000, 3);
return 1;
}
if (IsAtPPhone(i))
{
InfoBoxForPlayer(i, "~y~PHONE BOOTH~n~~b~/USEPHONE");
return 1;
}
if (PlayerToPoint(5.0, i,3637.2280,-999.4510,156.8103))
{
InfoBoxForPlayer(i, "~p~BEERSTORE~n~~y~TYPE /buydrink");
return 1;
}
if (PlayerToPoint(5.0, i,299.9413,-1608.5790,33.0807))
{
InfoBoxForPlayer(i, "~p~Business:~y~Hotel~n~~b~OWNER:~w~BANK~n~TO ENTER TYPE /ENTER");
return 1;
}
if (PlayerToPoint(5.0, i,1498.2429,-1582.1270,13.5498))
{
InfoBoxForPlayer(i, "~p~Business:~y~APARTMENT COMPLEX~n~~b~OWNER:~w~BANK~n~TO ENTER TYPE /ENTER");
return 1;
}
if (PlayerToPoint(5.0, i,1753.5541,-1893.8787,13.5571))
{
InfoBoxForPlayer(i, "~p~Business:~y~APARTMENT COMPLEX~n~~b~OWNER:~w~BANK~n~TO ENTER TYPE /ENTER");
return 1;
}
if (PlayerToPoint(5.0, i,1105.9545,-301.9370,74.5391))
{
GameTextForPlayer(i, "~w~Drug Seeds~n~~r~/buyseeds", 5000, 3);
return 1;
}
if (PlayerToPoint(5.0, i,361.8300,173.2659,1008.3828))
{
InfoBoxForPlayer(i, "~p~Business:~y~AGENCY~n~~b~OWNER:~w~BANK~n~TO ACCESS TYPE /SECURE");
return 1;
}
if (PlayerToPoint(5.0, i,2309.9124,32.3308,-41.4836))
{
InfoBoxForPlayer(i, "~b~Business:~w~BANK~n~~b~OWNER:~w~BANK~n~TO ACCESS TYPE /BUYVAULT,THEN /VAULT");
return 1;
}
for(new h = 0; h < sizeof(Jobs); h++)
{
if(PlayerToPoint(2.0, i, Jobs[h][0], Jobs[h][1], Jobs[h][2]))
{
format(string, sizeof(string), "~b~TYPE:~w~JOB~n~~b~INFO:~w~%s", JobNames[h]);
InfoBoxForPlayer(i, string);
SendDebugMessage("CustomPickups, Jobs");
}
}
pawn Код:
stock InfoBoxForPlayer(playerid, text[])
{
TextDrawHideForPlayer(playerid, InfoBox[playerid]);
// TextDrawDestroy(InfoBox[playerid]);
new string[800];
//ViewingBox[playerid] = 1;
format(string, sizeof(string), "%s", text);
TextDrawSetString(InfoBox[playerid], string);
TextDrawShowForPlayer(playerid, InfoBox[playerid]);
}