PDA

Просмотр полной версии : [Вопрос] return true



stimorol
05.09.2015, 15:35
Здравствуйте.

Сделал систему спавна:



stock SetPlayerSpawn(playerid)
{
if(PlayerInfo[playerid][pHouseCheck] == 1)
{
for(new h = 1; h <= m_h; h++)
{
if(strcmp(House[h][hOwner], GPNS(playerid),true) != 0) continue;
SetPlayerPos(playerid,HInts[House[h][hInterior]][hiX],HInts[House[h][hInterior]][hiY],HInts[House[h][hInterior]][hiZ]);
SetPlayerInterior(playerid,HInts[House[h][hInterior]][hiInt]);
SetPlayerVirtualWorld(playerid,House[h][hVirtWorld]);
}
}
else
{
SetPlayerPos(playerid, 2507.0801,-2122.6526,23.4558);
SetPlayerFacingAngle(playerid, 179.8550);
SetCameraBehindPlayer(playerid);
}
return true;
}


После:


SetPlayerVirtualWorld(playerid,House[h][hVirtWorld]);

Обязательно ставить return true?

Bady
05.09.2015, 15:47
Здравствуйте.

Сделал систему спавна:



stock SetPlayerSpawn(playerid)
{
if(PlayerInfo[playerid][pHouseCheck] == 1)
{
for(new h = 1; h <= m_h; h++)
{
if(strcmp(House[h][hOwner], GPNS(playerid),true) != 0) continue;
SetPlayerPos(playerid,HInts[House[h][hInterior]][hiX],HInts[House[h][hInterior]][hiY],HInts[House[h][hInterior]][hiZ]);
SetPlayerInterior(playerid,HInts[House[h][hInterior]][hiInt]);
SetPlayerVirtualWorld(playerid,House[h][hVirtWorld]);
}
}
else
{
SetPlayerPos(playerid, 2507.0801,-2122.6526,23.4558);
SetPlayerFacingAngle(playerid, 179.8550);
SetCameraBehindPlayer(playerid);
}
return true;
}


После:


SetPlayerVirtualWorld(playerid,House[h][hVirtWorld]);

Обязательно ставить return true?

тык (http://pro-pawn.ru/showthread.php?6662-%D0%9E%D0%BF%D0%B5%D1%80%D0%B0%D1%82%D0%BE%D1%80-%D0%B2%D0%BE%D0%B7%D0%B2%D1%80%D0%B0%D1%82%D0%B0-%28return%29)

stimorol
05.09.2015, 16:14
тык (http://pro-pawn.ru/showthread.php?6662-%D0%9E%D0%BF%D0%B5%D1%80%D0%B0%D1%82%D0%BE%D1%80-%D0%B2%D0%BE%D0%B7%D0%B2%D1%80%D0%B0%D1%82%D0%B0-%28return%29)

Прочитал, вроде понял. Спасибо.

- - - Добавлено - - -

То есть, если бы я там поставил return true, то код выполнился бы до участка:


SetPlayerVirtualWorld(playerid,House[h][hVirtWorld]);