Player position check
#9

Quote:
Originally Posted by ,TomY'
Посмотреть сообщение
Hey man, it works great, but I have one question.

Код:
new playerIdlePositions[MAX_PLAYERS+1][COORDINATION];
Why here MAX_PLAYERS+1? What means that +1?
I prefer to add an empty index to be able to reset the values when a player for i.e. connects.

PHP код:
public OnPlayerConnect(playerid) {
    
playerIdlePositions[playerid] = playerIdlePositions[MAX_PLAYERS];
    
// also valid:
    
playerIdlePositions[playerid] = EOS;
    return 
1;

Reply


Messages In This Thread
Player position check - by ,TomY' - 05.08.2018, 18:32
Re: Player position check - by DBZdabIt3Bro7 - 05.08.2018, 18:49
Re: Player position check - by NeXTGoD - 05.08.2018, 18:59
Re: Player position check - by DBZdabIt3Bro7 - 05.08.2018, 19:02
Re: Player position check - by NeXTGoD - 05.08.2018, 19:05
Re: Player position check - by DBZdabIt3Bro7 - 05.08.2018, 19:07
Re: Player position check - by NeXTGoD - 05.08.2018, 19:16
Re: Player position check - by ,TomY' - 05.08.2018, 20:25
Re: Player position check - by DBZdabIt3Bro7 - 05.08.2018, 20:41
Re: Player position check - by ,TomY' - 06.08.2018, 08:14

Forum Jump:


Users browsing this thread: 2 Guest(s)