02.11.2013, 15:45
Hello there.
After working on my server, i've stumbled upon a weird, but annoying problem.
Basicly, if you die, you get forced into the "SkinSelection" menu, but the wierd problem is; The script does not force you into this menu.
It's also not caused by the OnPlayerDeath function, as this does almost nothing as you can see below;
As you can see there, nothing is wrong with the function as the only thing it does, is save the current weapons that player had before they died, and to add a variable, to put them into the hospital later at "OnPlayerSpawn", but that's where the problem comes in...
Before the "OnPlayerSpawn" function gets called, you get forced into the SkinSelection screen, if you click spawn, you'll be put in the hospital, but eventually will have the CJ Skin.
Here's the screenshot of what I mean. Screenshot
I have already asked countless of people, but they also don't seem to know whats going on, so here I am.
Asking the SA:MP Community.
Regards,
Tessa.
After working on my server, i've stumbled upon a weird, but annoying problem.
Basicly, if you die, you get forced into the "SkinSelection" menu, but the wierd problem is; The script does not force you into this menu.
It's also not caused by the OnPlayerDeath function, as this does almost nothing as you can see below;
Код:
public OnPlayerDeath(playerid, killerid, reason) { GetPlayerWeaponData(playerid, 1, Player[playerid][Weapon1], Player[playerid][Weapon1a]); GetPlayerWeaponData(playerid, 2, Player[playerid][Weapon2], Player[playerid][Weapon2a]); GetPlayerWeaponData(playerid, 3, Player[playerid][Weapon3], Player[playerid][Weapon3a]); GetPlayerWeaponData(playerid, 4, Player[playerid][Weapon4], Player[playerid][Weapon4a]); GetPlayerWeaponData(playerid, 5, Player[playerid][Weapon5], Player[playerid][Weapon5a]); GetPlayerWeaponData(playerid, 6, Player[playerid][Weapon6], Player[playerid][Weapon6a]); GetPlayerWeaponData(playerid, 7, Player[playerid][Weapon7], Player[playerid][Weapon7a]); GetPlayerWeaponData(playerid, 8, Player[playerid][Weapon8], Player[playerid][Weapon8a]); playerdied[playerid] = 1; //Debug MSG SendClientMessageToAll(GREY, "Debug: OnPlayerDeath called."); return 1; }
Before the "OnPlayerSpawn" function gets called, you get forced into the SkinSelection screen, if you click spawn, you'll be put in the hospital, but eventually will have the CJ Skin.
Here's the screenshot of what I mean. Screenshot
I have already asked countless of people, but they also don't seem to know whats going on, so here I am.
Asking the SA:MP Community.
Regards,
Tessa.