Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Areas

$
0
0
hey I have this
PHP Code:

    else if (areatype[areaid][0] == AREA_TYPE_EPROP)
    {
        if (
IsPlayerInAnyVehicle(playerid) || (GetPlayerVirtualWorld(playerid) != && GetPlayerVirtualWorld(playerid) < 10000)) return 1;
        new 
playername[MAX_PLAYER_NAME], Float:xFloat:y;
        
GetPlayerName(playeridplayernameMAX_PLAYER_NAME);
          new 
string[256], name[MAX_PLAYER_NAME], str[256];
          
GetPlayerName(playeridnamesizeof(name));
          new 
temp2;
           
temp2 dini_Int(AddDirFile(dir_datafilesFILE_TOTALSTAT), "maxpropint");
        for (new 
1<= temp2i++)
        {
            
format(stringsizeof(string), "propint%d"i);
            
format(strsizeof(str), "prop%d"dini_Int(AddDirFile(dir_propintsstring), "propid"));
              if(
dini_Int(AddDirFile(dir_propintsstring), "locked")==1)
              {
                   
SendClientMessage(playeridCOLOR_RED"ERROR:This Property Is Locked.");
                   return 
1;
            }
            
adata[adata[areatype[areaid][1]][linkto]][ax] + floatsin(-adata[adata[areatype[areaid][1]][linkto]][aa], degrees) * 2.3;
            
adata[adata[areatype[areaid][1]][linkto]][ay] + floatcos(-adata[adata[areatype[areaid][1]][linkto]][aa], degrees) * 2.3;
            
SetPlayerVirtualWorld2(playerid10000+areaid);
            
SetPlayerInterior(playeridadata[adata[areatype[areaid][1]][linkto]][ai]);
            
SetPlayerPos(playeridxyadata[adata[areatype[areaid][1]][linkto]][az]);
            
SetPlayerFacingAngle(playeridadata[adata[areatype[areaid][1]][linkto]][aa]);
            
SetCameraBehindPlayer(playerid);
            
plastdoor[playerid] = areatype[areaid][1];
        }
    } 

this is when some one enter a house, but when I lock the house and try to enter it send me that the house is locked but tho it set my pos in the house so how to break and stop every thing if the house was locked?

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>