[Ajuda] Loop de verificaзгo de casas criadas
#2

Vocк pode criar uma variбvel global que salva o id da casa que o player estб dessa forma:

PHP код:
new hCasaEntrou[MAX_PLAYERS];
CMD:entrarcasa(playerid)
{
    for(new 
cMAX_CASASc++)
    {
        if(
IsPlayerInRangeOfPoint(playerid1.0hCasaInfo[c][hEnterX], hCasaInfo[c][hEnterY], hCasaInfo[c][hEnterZ]))
        {
            
SetPlayerInterior(playeridhCasaInfo[c][hInt]);
            
SetPlayerPos(playeridhCasaInfo[c][hSpawnX], hCasaInfo[c][hSpawnY], hCasaInfo[c][hSpawnZ]);
            
SetPlayerVirtualWorld(playeridhCasaInfo[c][hVWDentro]);
            
hCasaEntrou[playerid] = c;
        }
    }
    return 
true;
}
CMD:saircasa(playerid)
{
    new 
idcasa hCasaEntrou[playerid];
    
    if (
IsPlayerInRangeOfPoint(playerid1.0hCasaInfo[idcasa][hExitX], hCasaInfo[idcasa][hExitY], hCasaInfo[idcasa][hExitZ]))
    {
        
SetPlayerInterior(playerid0);
        
SetPlayerPos(playeridhCasaInfo[idcasa][hEnterX], hCasaInfo[idcasa][hEnterY], hCasaInfo[idcasa][hEnterZ]);
        
SetPlayerVirtualWorld(playerid0);
     }
    return 
true;

Reply


Messages In This Thread
Loop de verificaзгo de casas criadas - by zHellSync - 11.02.2019, 03:23
Re: Loop de verificaзгo de casas criadas - by wearLy - 11.02.2019, 04:59
Re: Loop de verificaзгo de casas criadas - by zHellSync - 11.02.2019, 11:52
Re: Loop de verificaзгo de casas criadas - by wearLy - 11.02.2019, 12:22
Re: Loop de verificaзгo de casas criadas - by AutoMatic2 - 11.02.2019, 13:01

Forum Jump:


Users browsing this thread: 4 Guest(s)