Remove spawn buttons when die.. +REP if help
#1

When a player connects to the server, I set his spawn info to LSPD. Player spawns correctly.

Every time that the player dies, his skin is set to 0 (CJ), and "Spawn" button and arrows appear like here:
https://i.gyazo.com/1248703ebf791618...3a5d1841d7.jpg

This is my whole GM (you can test yourself):
https://pastebin.com/TXABqNak

How can I please remove these buttons every time? I want a NORMAL SPAWN, not some class selection spawn!
Reply
#2

Use TogglePlayerSpectating for it.
NOTE: If you use TogglePlayerSpectating under OnPlayerConnect, be sure to add SetSpawnInfo(playerid, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); or you will experience crashings.
Reply
#3

Quote:
Originally Posted by kAn3
Посмотреть сообщение
Use TogglePlayerSpectating for it.
NOTE: If you use TogglePlayerSpectating under OnPlayerConnect, be sure to add SetSpawnInfo(playerid, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); or you will experience crashings.
If you look my code, I have it when the textdraw is being shown (when player connects). The issue is when the player dies, later. Are you suggesting me that the player should start spectating when dead? I want him to just normally respawn.
Reply
#4

onplayerdeath add spawnplayer.
Reply
#5

Quote:
Originally Posted by TakeiT
Посмотреть сообщение
onplayerdeath add spawnplayer.
1) This makes the "OnPlayerSpawn" be called twice.
2) It removes the deathcam (the camera that hovers over you after death ~3 secs). So player will spawn 0.01s after death, two times, which is not really good looking.
Reply
#6

Didnt read still your code but unless you press F4 before dying you should spawn normally. Probably you added something you need to check under OnPlayerDeath.
Reply
#7

Quote:
Originally Posted by kAn3
Посмотреть сообщение
Didnt read still your code but unless you press F4 before dying you should start normally. Probably you added something you need to check...
Test my code, that is all I have. I dont know why the spawn buttons come. I am not pressing F4.

Here: Spawn in LSPD, then die and spawn buttons and all bugged..
https://gyazo.com/f707096533707503ad6c7f53c2898fb5
Reply
#8

Add SpawnPlayer(playerid); on public OnPlayerRequestClassSpawn
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)