Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public update_zones()
- {
- new line1[10], line2[10];
- foreach(Character, i)
- {
- if(IsPlayerInPolygonZone(i) == 1) continue;
- UserInfo[i][zoneupdates] = 1;
- if(GetPlayerVirtualWorld(i) == 1236 && UserInfo[i][CurrentInterior] == 6)
- {
- format(UserInfo[i][LocationZone], 100, "Admin Hangout");
- PlayerTextDrawSetString(i, plaInfoLocation[i], "Admin Hangout");
- continue;
- }
- if(GetPlayerVirtualWorld(i) == 1505 && UserInfo[i][CurrentInterior] == 17)
- {
- format(UserInfo[i][LocationZone], 100, "Powerplant in Missionary Hill");
- PlayerTextDrawSetString(i, plaInfoLocation[i], "Powerplant ~n~in Missionary Hill");
- continue;
- }
- if(UserInfo[i][zoneupdates] == 1)
- {
- player_zone_before[i] = player_zone[i];
- player_zone[i] = -1;
- if(IsPlayerJailed2(i) == 1)
- {
- if(CityType == 1)
- {
- format(UserInfo[i][LocationZone], 100, "San Fierro Police Dept");
- PlayerTextDrawSetString(i, plaInfoLocation[i], "San Fierro Police Dept");
- }
- else if(CityType == 2)
- {
- format(UserInfo[i][LocationZone], 100, "Las Venturas Police Dept");
- PlayerTextDrawSetString(i, plaInfoLocation[i], "Las Venturas Police Dept");
- }
- else if(CityType == 3)
- {
- format(UserInfo[i][LocationZone], 100, "Los Santos Police Dept");
- PlayerTextDrawSetString(i, plaInfoLocation[i], "Los Santos Police Dept");
- }
- continue;
- }
- if(UserInfo[i][InHouseID] >= 0 || UserInfo[i][InStoreID] >= 0)
- {
- if(UserInfo[i][InHouseID] >= 0)
- {
- NormalString[0] = EOS;
- new h = UserInfo[i][InHouseID];
- if(TimeTillHouseExit[i] >= 1)
- {
- format(UserInfo[i][LocationZone], 100, "House in %s", HouseInfo[h][HouseLoc]);
- format(UserInfo[i][LocZone], 100, UserInfo[i][LocationZone]);
- new position = strfind(UserInfo[i][LocationZone], " in ", true);
- if(position != -1)
- {
- PlayerTextDrawSetString(i, plaInfoBox[i], "~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ");
- strins(UserInfo[i][LocZone], "~n~", position);
- }
- else
- {
- PlayerTextDrawSetString(i, plaInfoBox[i], "~n~ ~n~ ~n~ ~n~ ~n~ ");
- }
- PlayerTextDrawSetString(i, plaInfoLocation[i], UserInfo[i][LocZone]);
- }
- else
- {
- if(strcmp(HouseInfo[h][HouseMessage],"Unknown Message",true) && strcmp(HouseInfo[h][HouseMessage],"Unowned House",true))
- {
- format(UserInfo[i][LocationZone], 100, "%s in %s", HouseInfo[h][HouseMessage], HouseInfo[h][HouseLoc]);
- format(UserInfo[i][LocZone], 100, UserInfo[i][LocationZone]);
- new position = strfind(UserInfo[i][LocationZone], " in ", true);
- if(position != -1)
- {
- PlayerTextDrawSetString(i, plaInfoBox[i], "~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ");
- strins(UserInfo[i][LocZone], "~n~", position);
- }
- else
- {
- PlayerTextDrawSetString(i, plaInfoBox[i], "~n~ ~n~ ~n~ ~n~ ~n~ ");
- }
- PlayerTextDrawSetString(i, plaInfoLocation[i], UserInfo[i][LocZone]);
- }
- else
- {
- format(UserInfo[i][LocationZone], 100, "%s's House in %s", HouseInfo[h][HOwner], HouseInfo[h][HouseLoc]);
- format(UserInfo[i][LocZone], 100, UserInfo[i][LocationZone]);
- new position = strfind(UserInfo[i][LocationZone], " in ", true);
- if(position != -1)
- {
- PlayerTextDrawSetString(i, plaInfoBox[i], "~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ");
- strins(UserInfo[i][LocZone], "~n~", position);
- }
- else
- {
- PlayerTextDrawSetString(i, plaInfoBox[i], "~n~ ~n~ ~n~ ~n~ ~n~ ");
- }
- PlayerTextDrawSetString(i, plaInfoLocation[i], UserInfo[i][LocZone]);
- }
- }
- continue;
- }
- new b = UserInfo[i][InStoreID];
- if(UserInfo[i][InStoreID] >= 0 && StoreInfo[b][StoreType] != 9 && StoreInfo[b][StoreType] != 10 && StoreInfo[b][StoreType] != 11 && StoreInfo[b][StoreType] != 13 && StoreInfo[b][StoreType] != 15 && StoreInfo[b][StoreType] != 26 && StoreInfo[b][StoreType] != 27)
- {
- NormalString[0] = EOS;
- format(NormalString, sizeof(NormalString),"%s In %s",StoreInfo[UserInfo[i][InStoreID]][StoreMessage],StoreInfo[UserInfo[i][InStoreID]][StoreLoc]);
- format(UserInfo[i][LocationZone], 100, NormalString);
- format(UserInfo[i][LocZone], 100, UserInfo[i][LocationZone]);
- new position = strfind(UserInfo[i][LocationZone], " in ", true);
- if(position != -1)
- {
- PlayerTextDrawSetString(i, plaInfoBox[i], "~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ");
- strins(UserInfo[i][LocZone], "~n~", position);
- }
- else
- {
- PlayerTextDrawSetString(i, plaInfoBox[i], "~n~ ~n~ ~n~ ~n~ ~n~ ");
- }
- PlayerTextDrawSetString(i, plaInfoLocation[i], UserInfo[i][LocZone]);
- }
- continue;
- }
- for(new j=0; j<sizeof(zones);j++)
- {
- if(IsPlayerInZone(i,j) && player_zone[i] == -1)
- {
- player_zone[i] = j;
- format(line1,10,"p%dzone",i);
- format(line2,10,"%d",j);
- PropertySet(line1,line2);
- if(!strcmp(zones[j][zone_name],"Palomino Creek",true) && GetPlayerVirtualWorld(i) == 100)
- {
- strreplace2(zones[j][zone_name],"Palomino Creek","Bank of San Andreas",true);
- }
- SetStoreNames(i,j,GetPlayerVirtualWorld(i));
- if(UserInfo[i][CurrentInterior] != 0)
- {
- if(strcmp(ShopLocation[i]," ",true) && strcmp(ShopLocation[i],"REMOVED ",true))
- {
- NormalString[0] = EOS;
- format(NormalString, sizeof(NormalString),"%s in %s",zones[j][zone_name],ShopLocation[i]);
- UserInfo[i][LocationZone][0] = EOS;
- format(UserInfo[i][LocationZone], 100, NormalString);
- format(UserInfo[i][LocZone], 100, UserInfo[i][LocationZone]);
- new position = strfind(UserInfo[i][LocationZone], " in ", true);
- if(position != -1)
- {
- PlayerTextDrawSetString(i, plaInfoBox[i], "~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ");
- strins(UserInfo[i][LocZone], "~n~", position);
- }
- else
- {
- PlayerTextDrawSetString(i, plaInfoBox[i], "~n~ ~n~ ~n~ ~n~ ~n~ ");
- }
- PlayerTextDrawSetString(i, plaInfoLocation[i], UserInfo[i][LocZone]);
- }
- new zoner = player_zone_before[i];
- new zoner2 = player_zone_before_area[i];
- if(i >= 0 && zoner != -1 && zoner2 != -1)
- {
- if(zoner2 == 0)
- {
- if(!strcmp(ShopLocation[i]," ",true) && strcmp(zones[zoner][zone_name],zones[j][zone_name],true) && strcmp(ShopLocation[i],"REMOVED ",true))
- {
- NormalString[0] = EOS;
- format(NormalString, sizeof(NormalString),"%s in %s",zones[j][zone_name],zones[zoner][zone_name]);
- format(UserInfo[i][LocZone], 100, NormalString);
- new position = strfind(NormalString, "in", true);
- if(position != -1)
- {
- PlayerTextDrawSetString(i, plaInfoBox[i], "~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ");
- strins(UserInfo[i][LocZone], "~n~", position);
- }
- else
- {
- PlayerTextDrawSetString(i, plaInfoBox[i], "~n~ ~n~ ~n~ ~n~ ~n~ ");
- }
- PlayerTextDrawSetString(i, plaInfoLocation[i], UserInfo[i][LocZone]);
- player_zoner[i][0] = EOS;
- format(player_zoner[i],24,"%s",zones[zoner][zone_name]);
- UserInfo[i][LocationZone][0] = EOS;
- format(UserInfo[i][LocationZone], 100, NormalString);
- }
- }
- else if(zoner2 >= 1 && zoner2 < sizeof(DynamicZone))
- {
- if(!strcmp(ShopLocation[i]," ",true) && strcmp(ShopLocation[i],"REMOVED ",true))
- {
- NormalString[0] = EOS;
- format(NormalString, sizeof(NormalString),"%s in %s",zones[j][zone_name],DynamicZone[zoner2][ZoneName]);
- format(UserInfo[i][LocZone], 100, NormalString);
- new position = strfind(NormalString, "in", true);
- if(position != -1)
- {
- PlayerTextDrawSetString(i, plaInfoBox[i], "~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ");
- strins(UserInfo[i][LocZone], "~n~", position);
- }
- else
- {
- PlayerTextDrawSetString(i, plaInfoBox[i], "~n~ ~n~ ~n~ ~n~ ~n~ ");
- }
- PlayerTextDrawSetString(i, plaInfoLocation[i], UserInfo[i][LocZone]);
- player_zoner[i][0] = EOS;
- format(player_zoner[i],24,"%s",DynamicZone[zoner2][ZoneName]);
- UserInfo[i][LocationZone][0] = EOS;
- format(UserInfo[i][LocationZone], 100, NormalString);
- }
- }
- }
- if(!strcmp(ShopLocation[i],"REMOVED ",true) && UserInfo[i][InHouseID] == -1)
- {
- NormalString[0] = EOS;
- format(NormalString, sizeof(NormalString),"%s",zones[j][zone_name]);
- UserInfo[i][LocationZone][0] = EOS;
- format(UserInfo[i][LocZone], 100, NormalString);
- new position = strfind(NormalString, "in", true);
- if(position != -1)
- {
- PlayerTextDrawSetString(i, plaInfoBox[i], "~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ");
- strins(UserInfo[i][LocZone], "~n~", position);
- }
- else
- {
- PlayerTextDrawSetString(i, plaInfoBox[i], "~n~ ~n~ ~n~ ~n~ ~n~ ");
- }
- PlayerTextDrawSetString(i, plaInfoLocation[i], UserInfo[i][LocZone]);
- format(UserInfo[i][LocationZone], 100, NormalString);
- }
- if(UserInfo[i][InHouseID] == -1 && !strcmp(zones[j][zone_name],"Las Venturas Police Dept",true) || !strcmp(zones[j][zone_name],"Los Santos Police Dept",true) || !strcmp(zones[j][zone_name],"San Fierro Police Dept",true))
- {
- NormalString[0] = EOS;
- format(NormalString, sizeof(NormalString),"%s",zones[j][zone_name]);
- format(UserInfo[i][LocZone], 100, NormalString);
- new position = strfind(NormalString, "in", true);
- if(position != -1)
- {
- PlayerTextDrawSetString(i, plaInfoBox[i], "~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ");
- strins(UserInfo[i][LocZone], "~n~", position);
- }
- else
- {
- PlayerTextDrawSetString(i, plaInfoBox[i], "~n~ ~n~ ~n~ ~n~ ~n~ ");
- }
- PlayerTextDrawSetString(i, plaInfoLocation[i], UserInfo[i][LocZone]);
- UserInfo[i][LocationZone][0] = EOS;
- format(UserInfo[i][LocationZone], 100, NormalString);
- }
- if(UserInfo[i][InHouseID] == -1 && !strcmp(zones[j][zone_name],"Las Venturas Police Dept",true) || !strcmp(zones[j][zone_name],"Los Santos Police Dept",true) || !strcmp(zones[j][zone_name],"San Fierro Police Dept",true))
- {
- NormalString[0] = EOS;
- format(NormalString, sizeof(NormalString),"%s",zones[j][zone_name]);
- format(UserInfo[i][LocZone], 100, NormalString);
- new position = strfind(NormalString, "in", true);
- if(position != -1)
- {
- PlayerTextDrawSetString(i, plaInfoBox[i], "~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ");
- strins(UserInfo[i][LocZone], "~n~", position);
- }
- else
- {
- PlayerTextDrawSetString(i, plaInfoBox[i], "~n~ ~n~ ~n~ ~n~ ~n~ ");
- }
- PlayerTextDrawSetString(i, plaInfoLocation[i], UserInfo[i][LocZone]);
- UserInfo[i][LocationZone][0] = EOS;
- format(UserInfo[i][LocationZone], 100, NormalString);
- }
- }
- else
- {
- format(NormalString, sizeof(NormalString),"%s",zones[j][zone_name]);
- UserInfo[i][LocationZone][0] = EOS;
- format(UserInfo[i][LocationZone], 100, zones[j][zone_name]);
- format(UserInfo[i][LocZone], 100, UserInfo[i][LocationZone]);
- new position = strfind(UserInfo[i][LocationZone], " in ", true);
- if(position != -1)
- {
- PlayerTextDrawSetString(i, plaInfoBox[i], "~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ");
- strins(UserInfo[i][LocZone], "~n~", position);
- }
- else
- {
- PlayerTextDrawSetString(i, plaInfoBox[i], "~n~ ~n~ ~n~ ~n~ ~n~ ");
- }
- PlayerTextDrawSetString(i, plaInfoLocation[i], UserInfo[i][LocZone]);
- player_zone[i] = j;
- format(line1,10,"p%dzone",i);
- format(line2,10,"%d",j);
- PropertySet(line1,line2);
- }
- }
- if(GetPlayerVirtualWorld(i) >= 1005 && UserInfo[i][CurrentInterior] >= 18)
- {
- NormalString[0] = EOS;
- format(NormalString, sizeof(NormalString),"Powerplant in Missionary Hill");
- format(UserInfo[i][LocZone], 100, NormalString);
- new position = strfind(NormalString, "in", true);
- if(position != -1)
- {
- PlayerTextDrawSetString(i, plaInfoBox[i], "~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ");
- strins(UserInfo[i][LocZone], "~n~", position);
- }
- else
- {
- PlayerTextDrawSetString(i, plaInfoBox[i], "~n~ ~n~ ~n~ ~n~ ~n~ ");
- }
- PlayerTextDrawSetString(i, plaInfoLocation[i], UserInfo[i][LocZone]);
- UserInfo[i][LocationZone][0] = EOS;
- format(UserInfo[i][LocationZone], 100, NormalString);
- }
- if(UserInfo[i][CurrentInterior] == 7 && j == 405)
- {
- if(player_zone[i] == -1) player_zone[i] = player_zone_before[i];
- break;
- }
- }
- if(player_zone[i] == -1) player_zone[i] = player_zone_before[i];
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement