12.06.2012, 17:13
I have a problem with my pickups.
The house pickups show perfectly, but when it comes to business pickups, they don't work at all.
Can anyone help me please? Code is below.
Thanks!
The house pickups show perfectly, but when it comes to business pickups, they don't work at all.
Can anyone help me please? Code is below.
pawn Код:
public PickupMessages(playerid)
{
new string[512];
for(new h = 1; h < MAX_HOUSES; h++)
{
if(IsPlayerInAnyVehicle(playerid)) return 1;
if(IsPlayerInRangeOfPoint(playerid, 2.0, Houses[h][HouseExteriorX], Houses[h][HouseExteriorY], Houses[h][HouseExteriorZ]))
{
if(GetPlayerVirtualWorld(playerid) == 0)
{
if(strmatch(Houses[h][HouseOwner], "Nobody"))
{
if(Player[playerid][AdminLevel] == 10)
{
format(string, sizeof(string), "~w~House %d~n~~b~%s~n~~w~Use ~b~/buyhouse~w~ to~n~buy this house~n~for ~g~$%d.", h, Houses[h][HouseName], Houses[h][HousePrice]);
}
else
{
format(string, sizeof(string), "~b~%s~n~~w~Use ~b~/buyhouse~w~ to~n~buy this house~n~for ~g~$%d.", Houses[h][HouseName], Houses[h][HousePrice]);
}
}
else
{
if(Player[playerid][AdminLevel] == 10)
{
format(string, sizeof(string), "~w~House %d~n~~b~%s~n~~w~Owner:~g~ %s", h, Houses[h][HouseName], Houses[h][HouseOwner]);
}
else
{
format(string, sizeof(string), "~b~%s~n~~w~Owner:~g~ %s", Houses[h][HouseName], Houses[h][HouseOwner]);
}
}
}
}
}
for(new b = 1; b < MAX_BUSINESS; b++)
{
if(IsPlayerInAnyVehicle(playerid)) return 1;
if(IsPlayerInRangeOfPoint(playerid, 2.0, Business[b][BusinessExteriorX], Business[b][BusinessExteriorY], Business[b][BusinessExteriorZ]))
{
if(GetPlayerVirtualWorld(playerid) == 0)
{
if(Player[playerid][AdminLevel] == 10)
{
format(string, sizeof(string), "~w~Business %d~n~~b~%s~n~~w~~n~Owner:~g~ %s~n~~w~Enter Fee: ~g~$%d~n~~w~~n~Type /enter to go inside", b, Business[b][BusinessName], Business[b][BusinessOwner], Business[b][BusinessEnterFee]);
}
else
{
format(string, sizeof(string), "~w~Business~n~~b~%s~n~~w~~n~Owner:~g~ %s~n~~w~Enter Fee: ~g~$%d~n~~w~~n~Type /enter to go inside", Business[b][BusinessName], Business[b][BusinessOwner], Business[b][BusinessEnterFee]);
}
}
}
}
GameTextForPlayer(playerid, string, 3000, 5);
return 1;
}