SA-MP Forums Archive
Question about spawning a player (UPDATE: SetPlayerHealth in OnPlayerSpawm) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Question about spawning a player (UPDATE: SetPlayerHealth in OnPlayerSpawm) (/showthread.php?tid=84418)



Question about spawning a player (UPDATE: SetPlayerHealth in OnPlayerSpawm) - Doktor - 30.06.2009

Hi, i have a little Question, what other ways there are to spawn a player after /login. I know you can user "SpawnPlayer", but this would cause the player to die. Is there any other way to spawn a player without dieing after he typed /login?


Re: Question about spawning a player - Serediucr - 30.06.2009

//onplreqspawn
setplayerpos


Re: Question about spawning a player - refshal - 30.06.2009

Quote:
Originally Posted by Serediucr
//onplreqspawn
OnPlayerRequestSpawn*


And don't forget the SetCameraBehindPlayer :P


Re: Question about spawning a player - Serediucr - 30.06.2009

Quote:
Originally Posted by coob
Quote:
Originally Posted by Serediucr
//onplreqspawn
OnPlayerRequestSpawn*


And don't forget the SetCameraBehindPlayer :P
lol , i wrote like that cause i'm bored , yea , and i forgot that :P


Re: Question about spawning a player - Correlli - 30.06.2009

Quote:
Originally Posted by Serediucr
//onplreqspawn
setplayerpos
That would set player's position when player would try to spawn, so no. He asked if there is any way to spawn him with function.

Quote:
Originally Posted by Doktor
Hi, i have a little Question, what other ways there are to spawn a player after /login. I know you can user "SpawnPlayer", but this would cause the player to die. Is there any other way to spawn a player without dieing after he typed /login?
It's not true, if the player dies then there is problem in your script (The Godfather has this problem i think).


Re: Question about spawning a player - Doktor - 01.07.2009

Quote:

OnPlayerRequestSpawn*


And don't forget the SetCameraBehindPlayer Tongue

Doesnt work, altough i see my Player, which is at the right Position, i dont see both the minimap and the Box and the top right corner.


Quote:

It's not true, if the player dies then there is problem in your script (The Godfather has this problem i think).

Im not using Godfather, dont know how, but i solved the Problem with dying. Is it normal that SpawnPlayer only works togheter with SetSpawnInfo? I dont need SetSpawnInfo, because there are different Spawnpoints, not just one...


Re: Question about spawning a player - Ignas1337 - 01.07.2009

hmm, wierd that you tell, but you can switch a vaue which represents who player is and do a few SeSpawnInfo's to spawn at diffrent locations with dirffrent weapons


Re: Question about spawning a player - Doktor - 01.07.2009

I already thought about that, but half of the stuff which you can set in SetSpawnInfo is not used like that in my script (selfmade roleplay). So i dont really need it, but as i see theres no other solution...


Re: Question about spawning a player - Ignas1337 - 01.07.2009

well you need coordinates for spawn for any script, that's a fact


Re: Question about spawning a player - Doktor - 01.07.2009

Thats right but i would like to use SetPlayerPos for it. The only time i need to use SetSpawnInfo is after /login, if someone dies, im using SetPlayerPos in OnPlayerSpawn.
I know its fact, that i need coordinates for spawing a player, but i dont need the other stuff in SetSpawnInfo, like Weapons, Ammo...

The best would be if SpawnPlayer wont need SetSpawnInfo. It should just display the minimap/weaponbox and call OnPlayerSpawn, where you can put your code