SA-MP Forums Archive
ForceClassSelection and OnPlayerDeath - 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)
+--- Thread: ForceClassSelection and OnPlayerDeath (/showthread.php?tid=436979)



ForceClassSelection and OnPlayerDeath - Yuup - 13.05.2013

Why wont this work?
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    ForceClassSelection(playerid);
    return 1;
}
I want to call OnPlayerRequestClass when a player dies.


Re: ForceClassSelection and OnPlayerDeath - Scenario - 13.05.2013

Show us the code underneath OnPlayerRequestClass().


Re: ForceClassSelection and OnPlayerDeath - MP2 - 13.05.2013

Perhaps it has to be called BEFORE death?


Re: ForceClassSelection and OnPlayerDeath - Yuup - 13.05.2013

Quote:
Originally Posted by MP2
Посмотреть сообщение
Perhaps it has to be called BEFORE death?
Thank you! To others that might have this problem, use ForceClassSelection in OnPlayerSpawn that will do the trick.
Код:
public OnPlayerSpawn(playerid)
{
    ForceClassSelection(playerid);
    return 1;
}



Re: ForceClassSelection and OnPlayerDeath - HashFr - 13.05.2013

Just don't do anything under OnPlayerDeath. The Class Selection is automatically called after the death in SAMP.


Re: ForceClassSelection and OnPlayerDeath - Yuup - 13.05.2013

Quote:
Originally Posted by HashFr
Посмотреть сообщение
Just don't do anything under OnPlayerDeath. The Class Selection is automatically called after the death in SAMP.
No it's not.


Re: ForceClassSelection and OnPlayerDeath - austin070 - 18.10.2014

EDIT: Accident, sorry. Posted on the searched topic instead of the help topic.