House wont work? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: House wont work? (
/showthread.php?tid=488892)
House wont work? -
DerickClark - 19.01.2014
warning 202: number of arguments does not match definition
topic say it.
pawn Код:
forward UpdatePlayersHouseInfo();
public UpdatePlayersHouseInfo()
{
new str[100]; //The string we are gonna format
for(new i = 0; i < MAX_PLAYERS; i++) //Loop through all the players
{
for(new j = 0; j < MAX_HOUSES; j++) //Loop through all the houses
{
if(IsPlayerInRangeOfPoint(j, HouseInfo[j][hEnterX], HouseInfo[j][hEnterY], HouseInfo[j][hEnterZ]) && GetPlayerInterior(i) == HouseInfo[j][hOutsideInt] && GetPlayerVirtualWorld(i) == HouseInfo[j][hOutsideVir]) //You already know this! If you don't know it, do step 3 again!
{
if(HouseInfo[j][hOwned]) //Is house owned?
format(str, 100, "~w~House owned by ~r~%s", HouseInfo[j][hOwner]); //Will give: {white_color}House owned by {yellow_color}OWNER
else //House isn't owned
format(str, 100, "~w~House for sale!~n~Price: ~g~$%d,-", HouseInfo[j][hPrice]); //Will give: {white_color}House for sale!{new line}Price: {green_color}$PRICE
GameTextForPlayer(i, str, 2000, 3); //Show the text 2 seconds!
}
}
}
return 1;
}
Re: House wont work? -
zola0311 - 19.01.2014
i think this is the problem:
Код:
if(IsPlayerInRangeOfPoint(j, HouseInfo[j][hEnterX], HouseInfo[j][hEnterY], HouseInfo[j][hEnterZ]) && GetPlayerInterior(i) == HouseInfo[j][hOutsideInt] && GetPlayerVirtualWorld(i) == HouseInfo[j][hOutsideVir])
Код:
if(IsPlayerInRangeOfPoint(playerid, range, x, y, z))
Re: House wont work? -
DerickClark - 19.01.2014
Thanks.