DynamicCP Don't work
#5

All house prices is 15000$ or 20000$

The new code after when i try all your suggestions:

Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    printf("Player %i entering dynamic checkpoint %i", playerid, checkpointid);
    if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
    {
    	new string[128];
	    for (new c=0; c<MAX_HOUSES; c++)
		{
 			if(checkpointid == Houses[c][PickupID])
			{
				if (IsPlayerInRangeOfPoint(1.5,playerid,Houses[c][EnterX], Houses[c][EnterY], Houses[c][EnterZ]))
				{
				    if(Houses[c][HousePrice] != 0)
				    {
					    if(Houses[c][Owned] == 0)
					    {
							SendClientMessage(playerid, COLOR_GREEN, "Doresti sa cumperi aceasta proprietate?");
							format(string, sizeof(string), "Price: $%d", Houses[c][HousePrice]);
					    	SendClientMessage(playerid, COLOR_GREEN, string);
					    	SendClientMessage(playerid, COLOR_WHITE, "Available commands: /buyhouse, /enter, /ds(hout)");
						}
						else
						{
						    if(Houses[c][Rentable] == 1)
						    {
						        new string2[128];
								format(string, sizeof(string), "[Adress: %d] You're standing on %s's porch.",c,Houses[c][Owner]);
						    	SendClientMessage(playerid, COLOR_GREEN, string);
								format(string2, sizeof(string2), "Available commands: /enter, /ds(hout), /rentroom (Price: $%d)", Houses[c][RentCost]);
					    		SendClientMessage(playerid, COLOR_WHITE, string2);
						    }
						    else
						    {
								format(string, sizeof(string), "[Adress: %d] You're standing on %s's porch",c,Houses[c][Owner]);
						    	SendClientMessage(playerid, COLOR_GREEN, string);
						    	SendClientMessage(playerid, COLOR_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: 1 Guest(s)