- Регистрация
- 23 Сен 2016
- Сообщения
- 129
- Лучшие ответы
- 0
- Репутация
- 0
Вот недавно решил взять за основу GarHouse v3.0, как сделать так что бы игрока спавнило в доме. (ибо его не спавнит)
Вот пару пабликов.
Вот пару пабликов.
PHP:
public OnPlayerSpawn(playerid)
{
if(GetPVarInt(playerid, "FirstSpawn") == 0)
{
// Used to make the player spawn in their house if they quit in their house (only called for first spawn)
#if defined SPAWN_IN_HOUSE
SetTimerEx("HouseSpawning", HSPAWN_TIMER_RATE, false, "i", playerid);
#endif
// Increase timer rate if your gamemodes OnPlayerSpawn gets called after the timer has ended
}
return 1;
}
PHP:
forward HouseSpawning(playerid);
public HouseSpawning(playerid)
{
new file[HOUSEFILE_LENGTH];
Loop(h, MAX_HOUSES)
{
if(!strcmp(GetHouseOwner(h), pNick(playerid), CASE_SENSETIVE))
{
format(file, sizeof(file), FILEPATH, h);
if(dini_Int(file, "QuitInHouse") == 1)
{
SetPVarInt(playerid, "IsInHouse", 1);
SetPVarInt(playerid, "LastHouseCP", h);
SetPlayerHouseInterior(playerid, h);
#if defined GH_HOUSECARS
LoadHouseCar(h);
#endif
SendClientMessage(playerid, COLOUR_INFO, I_HMENU);
dini_IntSet(file, "QuitInHouse", 0);
#if defined GH_DEBUGGING
printf(DEBUG_OP_SPAWN, pNick(playerid), playerid);
#endif
}
}
}
//SetPVarInt(playerid, "FirstSpawn", 1);
return 1;
}