Creating a stock 'IfPlayerIsInRangeOfHouse'
#6

To fix your empty statement problem:

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, Range, House[houseid][hExtPosX], House[houseid][hExtPosY], House[houseid][hExtPosZ]))
Quote:
Originally Posted by Deal-or-die
Посмотреть сообщение
Ahh righto, thanks all for your responses, may I ask what is this and how does it work?
pawn Код:
for( new houseid = 0; houseid < MAX_HOUSES; houseid ++ )
as far as I know it's a loop or something, whether that's correct or not I have no idea.
Correct, that is a loop.

1) It declares a variable, titled 'houseid'.
2) It will check if houseid is lower than MAX_HOUSES, and if it is, the 'houseid' variable is incremented by one each time, and the code below the following brace below the for loop '{' will be executed (it's like an if statement, but it repeats).

More info: https://sampforum.blast.hk/showthread.php?tid=305770
Reply


Messages In This Thread
Creating a stock 'IfPlayerIsInRangeOfHouse' - by Deal-or-die - 13.09.2012, 15:53
AW: Creating a stock 'IfPlayerIsInRangeOfHouse' - by BiosMarcel - 13.09.2012, 15:56
Re: Creating a stock 'IfPlayerIsInRangeOfHouse' - by ddnbb - 13.09.2012, 15:57
Re: Creating a stock 'IfPlayerIsInRangeOfHouse' - by IstuntmanI - 13.09.2012, 15:58
Re: Creating a stock 'IfPlayerIsInRangeOfHouse' - by Deal-or-die - 13.09.2012, 16:18
Re: Creating a stock 'IfPlayerIsInRangeOfHouse' - by Emmet_ - 13.09.2012, 16:21
Re: Creating a stock 'IfPlayerIsInRangeOfHouse' - by Deal-or-die - 13.09.2012, 16:27

Forum Jump:


Users browsing this thread: 1 Guest(s)