SA-MP Forums

Go Back   SA-MP Forums > SA-MP > Bug Reports

Reply
 
Thread Tools Display Modes
Old 29/03/2012, 05:50 PM   #1
BeckzyBoi
High-roller
 
Join Date: Dec 2006
Posts: 1,497
Reputation: 66
Default SpawnPlayer

SpawnPlayer still kills the player if they are in a vehicle. This happens if the spawn position is outside of the players stream zone. However if the spawn position is in the stream zone the player will respawn but their camera stays attached to the vehicle.
BeckzyBoi is offline   Reply With Quote
Old 29/03/2012, 07:08 PM   #2
Jay_
Beta Tester
 
Jay_'s Avatar
 
Join Date: Jul 2009
Posts: 610
Reputation: 126
Default Re: SpawnPlayer

Lol, no offence, but do you ever give up?

I remember that you reported this problem on IRC numerous times during the 0.3a VIP betas.

The original problem was that the function was causing an issue with the players camera when it was used on a player inside a vehicle.
It was changed in one of the 0.3a release candidates to kill the player prior to them being respawned. This change was obviously implemented because there was no other practical solution to the problem yet you continue to constantly express your concern that this is a bug despite the killing action clearly being intentional.

It's obviously an issue in the game and the current fix is obviously the only practical solution available otherwise I'm pretty sure a better way to compromise it would've been implemented at the time.

There are much more important priorities. If this issue is still affecting you that badly then I'm pretty sure you have the scripting knowledge to create a more practical workaround that may suit your needs.
Jay_ is offline   Reply With Quote
Old 29/03/2012, 07:41 PM   #3
kurta999
Gangsta
 
kurta999's Avatar
 
Join Date: Apr 2009
Location: Alsˇszeli, Hungary
Posts: 888
Reputation: 296
Default Re: SpawnPlayer

I don't know then it.

I use this method, in 0.3d this was not work when the player in vehicle. (After spawn, i got beer)
In 0.3e works without any problem, so there are some minor changes.

pawn Code:
public OnPlayerDeath(playerid, killerid, reason)
{
    return SetTimerEx("RespawnPlayerAfterDeath", 0, false, "d", playerid);
}

forward RespawnPlayerAfterDeath(playerid);
public RespawnPlayerAfterDeath(playerid)
{
    SetCameraBehindPlayer(playerid);
    SetPlayerHealth(playerid, 100.0);
    return SpawnPlayer(playerid);
}
kurta999 is offline   Reply With Quote
Old 29/03/2012, 09:34 PM   #4
Partner
Little Clucker
 
Partner's Avatar
 
Join Date: Feb 2012
Posts: 40
Reputation: 42
Default Re: SpawnPlayer

Use this script:

pawn Code:
stock SpawnPlayerPlease(playerid)
{
    SetPlayerPos(playerid, 0.0, 0.0, 0.0);
    SpawnPlayer(playerid);
    return 1;
}

Easy as can be.
__________________


[Tutorial] SA:MP Images usage, list and usage.

Please if i helped you.
Partner is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SpawnPlayer(); WackoX Bug Reports 13 27/02/2012 09:49 PM
SpawnPlayer vladi866 Scripting Help 8 11/01/2012 07:58 PM
SpawnPlayer HondaCBR Scripting Help 3 28/12/2011 01:42 AM
0.3d SpawnPlayer AirPlus Scripting Help 3 04/11/2011 02:10 PM


All times are GMT. The time now is 03:13 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.