how to house spawn
#1

how to make if player quit the game in house and when he back so player forced spawn in house. but if player quite /q game in house so.
Reply
#2

https://sampwiki.blast.hk/wiki/SetSpawnInfo

first you first have to save the coordinates using any saving method then use that above.
Reply
#3

Quote:
Originally Posted by kamzaf
Посмотреть сообщение
https://sampwiki.blast.hk/wiki/SetSpawnInfo

first you first have to save the coordinates using any saving method then use that above.
so i need go to everyy house and save corrds? lol, Its for player spawn without interior. i want spawn in house.
Reply
#4

OnPlayerSpawn ask it
PHP код:
    switch(GetPVarInt(playerid,"House"))
    {
        case 
0:{} //No House
        
case 1:{SetPlayerPos(playerid,x,y,z);SetPlayerInterior(playerid,X);} //First House
        
case 2// and so on
            //case 3: //Third house.. 
Reply
#5

Quote:
Originally Posted by sscarface
Посмотреть сообщение
so i need go to everyy house and save corrds? lol, Its for player spawn without interior. i want spawn in house.
Yes of course, otherwise how else would the server know where to spawn the player if you dont save the coordinates of the house you want teh player in after he leaves.
Reply
#6

or just spawn him at the pickup coords... its easier and u only have to do it once with a for loop
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)