Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerEnterDynamicArea(playerid, areaid)
- {
- for(new i=0;i<MAX_TREASURE;i++){
- if(areaid == circle[i])
- {
- new Float:x,Float:y,Float:z;
- GetDynamicObjectPos(treasure[i],x,y,z);
- new Float: Distance = GetPlayerDistanceFromPoint(playerid, x, y, z),Dis[44];
- format(Dis, sizeof(Dis), "%.2f", Distance);
- PlayerTextDrawSetString(playerid, Paketic[5][playerid], Dis);
- PlayerTextDrawShow(playerid, Paketic[0][playerid]);
- PlayerTextDrawShow(playerid, Paketic[1][playerid]);
- PlayerTextDrawShow(playerid, Paketic[2][playerid]);
- PlayerTextDrawShow(playerid, Paketic[3][playerid]);
- PlayerTextDrawShow(playerid, Paketic[4][playerid]);
- PlayerTextDrawShow(playerid, Paketic[5][playerid]);
- PlayerTextDrawShow(playerid, Paketic[6][playerid]);
- PlayerTextDrawShow(playerid, Paketic[7][playerid]);
- }
- }
- if(areaid == YourZone[0],YourZone[1],YourZone[2],YourZone[3],YourZone[4],YourZone[5],YourZone[6],YourZone[7],YourZone[8],YourZone[9])
- {
- PlayerTextDrawShow(playerid, zabrana[playerid]);
- SetTimerEx("TextDrawZabrana", 4000, false, "%i", playerid);
- GunAmmo[playerid] = 1;
- GunTajmer[playerid] = 3;
- SaveGuns(playerid);
- SAC_ResetPlayerWeapons(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- }
- return 1;
- }
- public OnPlayerLeaveDynamicArea(playerid, areaid)
- {
- if(areaid == YourZone[0],YourZone[1],YourZone[2],YourZone[3],YourZone[4],YourZone[5],YourZone[6],YourZone[7],YourZone[8],YourZone[9])
- {
- PlayerTextDrawShow(playerid, zabranaa[playerid]);
- SetTimerEx("TextDrawZabrana", 4000, false, "%i", playerid);
- LoadGuns(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- }
- for(new i=0;i<MAX_TREASURE;i++){
- if(areaid == circle[i])
- {
- PlayerTextDrawHide(playerid, Paketic[0][playerid]);
- PlayerTextDrawHide(playerid, Paketic[1][playerid]);
- PlayerTextDrawHide(playerid, Paketic[2][playerid]);
- PlayerTextDrawHide(playerid, Paketic[3][playerid]);
- PlayerTextDrawHide(playerid, Paketic[4][playerid]);
- PlayerTextDrawHide(playerid, Paketic[5][playerid]);
- PlayerTextDrawHide(playerid, Paketic[6][playerid]);
- PlayerTextDrawHide(playerid, Paketic[7][playerid]);
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement