DynamicCP Don't work
#9

Ignore what I said about the pickups and checkpoints, I just saw that you used that name but it's correct.

PHP код:
// when creating the checkpoint for a house:
Houses[idx][PickupID] = CreateDynamicCP(Houses[idx][EnterX], Houses[idx][EnterY], Houses[idx][EnterZ], 1.4, -1, -1, -11.4);
Streamer_SetIntData(STREAMER_TYPE_CPHouses[idx][PickupID], E_STREAMER_EXTRA_IDMAX_HOUSES idx);
public 
OnPlayerEnterDynamicCP(playeridcheckpointid)
{
    if(
GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
    {
        new 
house_index Streamer_GetIntData(STREAMER_TYPE_CPcheckpointE_STREAMER_EXTRA_ID);
        if (
house_index >= MAX_HOUSES)
        {
            
house_index -= MAX_HOUSES;
            if (
Houses[house_index][HousePrice])
            {
                if (!
Houses[house_index][Owned])
                {
                    
SendClientMessage(playeridCOLOR_GREEN"Doresti sa cumperi aceasta proprietate?");
                    new 
string[20];
                    
format(stringsizeof(string), "Price: $%d"Houses[house_index][HousePrice]);
                    
SendClientMessage(playeridCOLOR_GREENstring);
                    
SendClientMessage(playeridCOLOR_WHITE"Available commands: /buyhouse, /enter, /ds(hout)");
                }
                else
                {
                    new 
string[70];
                    if (
Houses[house_index][Rentable])
                    {
                        
format(stringsizeof(string), "[Adress: %d] You're standing on %s's porch."house_indexHouses[house_index][Owner]);
                        
SendClientMessage(playeridCOLOR_GREENstring);
                        
format(stringsizeof(string), "Available commands: /enter, /ds(hout), /rentroom (Price: $%d)"Houses[house_index][RentCost]);
                        
SendClientMessage(playeridCOLOR_WHITEstring);
                    }
                    else
                    {
                        
format(stringsizeof(string), "[Adress: %d] You're standing on %s's porch"house_indexHouses[house_index][Owner]);
                        
SendClientMessage(playeridCOLOR_GREENstring);
                        
SendClientMessage(playeridCOLOR_WHITE"Available commands: /enter, /ds(hout)");
                    }
                }
            }
        }
    }
    return 
1;

Reply


Messages In This Thread
DynamicCP Don't work - by Dominic123 - 28.05.2015, 19:19
Re: DynamicCP Don't work - by Dominic123 - 28.05.2015, 20:41
Re: DynamicCP Don't work - by PowerPC603 - 28.05.2015, 20:53
Re: DynamicCP Don't work - by Konstantinos - 28.05.2015, 20:57
Re: DynamicCP Don't work - by Dominic123 - 29.05.2015, 07:42
Re: DynamicCP Don't work - by Dominic123 - 29.05.2015, 15:47
Re: DynamicCP Don't work - by Konstantinos - 29.05.2015, 15:59
Re: DynamicCP Don't work - by Dominic123 - 29.05.2015, 17:28
Re: DynamicCP Don't work - by Konstantinos - 29.05.2015, 17:46
Re: DynamicCP Don't work - by Dominic123 - 29.05.2015, 17:53

Forum Jump:


Users browsing this thread: 2 Guest(s)