when player dies, not onplayerspawn gets called? - 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: when player dies, not onplayerspawn gets called? (
/showthread.php?tid=342433)
when player dies, not onplayerspawn gets called? -
niels44 - 13.05.2012
hey guys,
im trying to make it that when a player connects, he gets a menu with dialogs etc, that works fine, but i want that when he dies he doesnt gets that dialog and menus etc, but he just spawns without all that, so i mean onplayerspawn doesnt gets called... but i cant get it fixed
, also OnPlayerRequestSpawn doesnt works also
, anyone knows how to fix?
greets niels
Re: when player dies, not onplayerspawn gets called? -
Audi_Quattrix - 13.05.2012
Maybe try to put them OnPlayerConnect
Re: when player dies, not onplayerspawn gets called? -
niels44 - 13.05.2012
how you mean? put them when die at onplayerconnect? and how?
Re: when player dies, not onplayerspawn gets called? -
Audi_Quattrix - 13.05.2012
I mean put dialogues OnPlayerConnect
Re: when player dies, not onplayerspawn gets called? -
MarinacMrcina - 13.05.2012
Can you give us your OnPlayerRequestClass,OnPlayerSpawn and OnPlayerDeath so we can help you with your problem?
Re: when player dies, not onplayerspawn gets called? -
iGetty - 13.05.2012
It's easy.
Make a player variable;
pawn Код:
new DialogShown[MAX_PLAYERS] = 0;
public OnPlayerConnect(playerid)
{
DialogShown[playerid] = 0;
if(DialogShown[playerid] == 0)
{
//your code
DialogShown[playerid] = 1;
}
//Rest of your code
}
There mate.
Re: when player dies, not onplayerspawn gets called? -
niels44 - 14.05.2012
ah yeah never thought of a simple variable XD thnx
gonna try it out