Players dont spawn at hospital when killed/die
#1

ive tried to fix this multiple times but i cant. whenever a player dies in my server the player doesn't get sent to the hospital like i have it set, instead the player just gets sent to where the last saved pos was when they last signed in/signed out. does anyone know why it does that?
Reply
#2

Add SetPlayerPos on your script at OnPlayerDeath
Reply
#3

Quote:
Originally Posted by Kiyozi_Mu
Посмотреть сообщение
Add SetPlayerPos on your script at OnPlayerDeath
already did, still doesn't work
Reply
#4

Show me your script...
Reply
#5

you have to use SetPlayerPos in OnPlayerSpawn, not OnPlayerDeath, if you want to teleport corpses go ahead..
Reply
#6

Another good alternative is SetSpawnInfo to be used in OnPlayerDeath will be much smoother than setting pos when they spawn.

https://sampwiki.blast.hk/wiki/SetSpawnInfo
Reply
#7

Copy That OnPlayerDeath
///////////
If You Want When Player Die GOTO LS Hospital Copy This To PLayer Death
pawn Код:
SetPlayerPos(playerid, 1178.1700,-1323.8579,14.1068);
SetPlayerFacingAngle(playerid, 268.9846);
If You Want When Player Die GOTO SF Hospital Copy This To PLayer Death
pawn Код:
SetPlayerPos(playerid, -2654.4163,634.4133,14.4531);
SetPlayerFacingAngle(playerid, 178.7854);
If You Want When Player Die GOTO LVHospital Copy This To PLayer Death
pawn Код:
SetPlayerPos(playerid, 164,1607.8773,1819.8993,10.8280);
SetPlayerFacingAngle(playerid, 2.2936);
\\\\\\\\\\\\

Copy That On Player Disconnect, But Try Not To Restart The Server So He Can Spawn from where he disconnect

pawn Код:
//Put That On The Top Of The Script
new XX, YY, ZZ

//On Player Disconnect
GetPlayerPos(playerid, XX, YY, ZZ);

//On Player Spawn
SetPlayerPos(playerid, XX, YY, ZZ);
IF THERE IS ANY BUG U CAN CONTACT ME

Thank You...
Reply
#8

Quote:
Originally Posted by GoldZoroGrab
Посмотреть сообщение
Copy That OnPlayerDeath
///////////
If You Want When Player Die GOTO LS Hospital Copy This To PLayer Death
pawn Код:
SetPlayerPos(playerid, 1178.1700,-1323.8579,14.1068);
SetPlayerFacingAngle(playerid, 268.9846);
If You Want When Player Die GOTO SF Hospital Copy This To PLayer Death
pawn Код:
SetPlayerPos(playerid, -2654.4163,634.4133,14.4531);
SetPlayerFacingAngle(playerid, 178.7854);
If You Want When Player Die GOTO LVHospital Copy This To PLayer Death
pawn Код:
SetPlayerPos(playerid, 164,1607.8773,1819.8993,10.8280);
SetPlayerFacingAngle(playerid, 2.2936);
\\\\\\\\\\\\

Copy That On Player Disconnect, But Try Not To Restart The Server So He Can Spawn from where he disconnect

pawn Код:
//Put That On The Top Of The Script
new XX, YY, ZZ

//On Player Disconnect
GetPlayerPos(playerid, XX, YY, ZZ);

//On Player Spawn
SetPlayerPos(playerid, XX, YY, ZZ);
IF THERE IS ANY BUG U CAN CONTACT ME

Thank You...
get this error
Код:
error 001: expected token: ";", but found "native"
Reply
#9

pawn Код:
new XX, YY, ZZ
Change to
pawn Код:
new XX, YY, ZZ;
Reply
#10

ok, no more errors but still dont spawn at hospital after death
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)