SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 09/11/2017, 02:48 AM   #1
Kevin51
Big Clucker
 
Kevin51's Avatar
 
Join Date: May 2013
Posts: 89
Reputation: 26
Default Problem Death player

Hello everyone.

I have a very small problem, when the player dies his returns him in the ClassSelection, but his only one time ..

Example: If I get killed a first time, it returns to ClassSelection, but the other times it works, I do not understand .. and it does it for everyone.

Have a idea ?
__________________
<signature too big>
Kevin51 is offline   Reply With Quote
Old 09/11/2017, 02:51 AM   #2
StrikerZ
High-roller
 
StrikerZ's Avatar
 
Join Date: Mar 2016
Location: Asgard
Posts: 1,050
Reputation: 154
Default Re: Problem Death player

PHP Code:
public OnPlayerRequestClass(playerid,classid)
{
    
SpawnPlayer(playerid);
    return 
1;

__________________
StrikerZ is offline   Reply With Quote
Old 09/11/2017, 02:56 AM   #3
Kevin51
Big Clucker
 
Kevin51's Avatar
 
Join Date: May 2013
Posts: 89
Reputation: 26
Default Re: Problem Death player

Quote:
Originally Posted by Sunehildeep View Post
PHP Code:
public OnPlayerRequestClass(playerid,classid)
{
    
SpawnPlayer(playerid);
    return 
1;

I already tried, I tried a lot of things before thread.. no work

And then, it does not work because I have several teams, and we have no time to select are gang his spawn alone live with your proposal
__________________
<signature too big>
Kevin51 is offline   Reply With Quote
Old 09/11/2017, 02:57 AM   #4
StrikerZ
High-roller
 
StrikerZ's Avatar
 
Join Date: Mar 2016
Location: Asgard
Posts: 1,050
Reputation: 154
Default Re: Problem Death player

Quote:
Originally Posted by Kevin51 View Post
I already tried, I tried a lot of things before thread.. no work
Search for ' ForceClassSelection(playerid); ' in your script
Edit: and do you want class selection at every death or not?
__________________
StrikerZ is offline   Reply With Quote
Old 09/11/2017, 03:00 AM   #5
Kevin51
Big Clucker
 
Kevin51's Avatar
 
Join Date: May 2013
Posts: 89
Reputation: 26
Default Re: Problem Death player

Quote:
Originally Posted by Sunehildeep View Post
Search for ' ForceClassSelection(playerid); ' in your script
I just watched, everything is good, the ForceClassSelection is only in commands
__________________
<signature too big>
Kevin51 is offline   Reply With Quote
Old 09/11/2017, 03:02 AM   #6
StrikerZ
High-roller
 
StrikerZ's Avatar
 
Join Date: Mar 2016
Location: Asgard
Posts: 1,050
Reputation: 154
Default Re: Problem Death player

Quote:
Originally Posted by Kevin51 View Post
I just watched, everything is good, the ForceClassSelection is only in commands
Can you check my edit in previous post? Need some more info
__________________
StrikerZ is offline   Reply With Quote
Old 09/11/2017, 03:03 AM   #7
Kevin51
Big Clucker
 
Kevin51's Avatar
 
Join Date: May 2013
Posts: 89
Reputation: 26
Default Re: Problem Death player

No I want that when the player gets killed, respawn normally, and no sends to the classSelection
Kevin51 is offline   Reply With Quote
Old 09/11/2017, 03:04 AM   #8
StrikerZ
High-roller
 
StrikerZ's Avatar
 
Join Date: Mar 2016
Location: Asgard
Posts: 1,050
Reputation: 154
Default Re: Problem Death player

Quote:
Originally Posted by Kevin51 View Post
No I want that when the player gets killed, respawn normally, and no sends to the classSelection
Can you show your OnPlayerDeath and OnPlayerSpawn and OnPlayerRequestClass ?
__________________
StrikerZ is offline   Reply With Quote
Old 09/11/2017, 03:14 AM   #9
Kevin51
Big Clucker
 
Kevin51's Avatar
 
Join Date: May 2013
Posts: 89
Reputation: 26
Default Re: Problem Death player

https://pastebin.com/VPRL07wg
Kevin51 is offline   Reply With Quote
Old 09/11/2017, 03:19 AM   #10
StrikerZ
High-roller
 
StrikerZ's Avatar
 
Join Date: Mar 2016
Location: Asgard
Posts: 1,050
Reputation: 154
Default Re: Problem Death player

OK try this,
Print the value of classid and isConnected in OnPlayerRequestClass and show the logs after you die
__________________
StrikerZ 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
Player death problem HassanShah Scripting Help 6 04/08/2016 12:54 PM
[ HELP ] Problem with the Player Death. SpikY_ Scripting Help 11 12/06/2015 08:36 AM
player not spawning after death problem flrp Scripting Help 4 25/09/2012 10:20 AM
Another problem with on player death CoDeZ Scripting Help 3 22/07/2012 08:00 PM


All times are GMT. The time now is 02:51 PM.


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