How can i do this? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How can i do this? (
/showthread.php?tid=193094)
How can i do this? -
mtywe - 24.11.2010
Hello i have a gamemode that has a problem when a player dies the skin gets changed back to CJ and after the first death the class selection does not pop up, so how can i make it so when a player dies the class selection does not happen?
Re: How can i do this? -
DaneAMattie - 24.11.2010
Quote:
Originally Posted by mtywe
Hello i have a gamemode that has a problem when a player dies the skin gets changed back to CJ and after the first death the class selection does not pop up, so how can i make it so when a player dies the class selection does not happen?
|
it usualy shouldnt, can you show your onPlayerDeath part?
Re: How can i do this? -
mtywe - 24.11.2010
Here you are
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
PlayerInfo[playerid][pSkin] = GetPlayerSkin(playerid);
SafeResetPlayerWeapons(playerid);
GetPlayerSkin(playerid);
PlayerInfo[playerid][pCards] = 0;
PlayerInfo[playerid][pCard1] = 0;
PlayerInfo[playerid][pCard2] = 0;
ResetPlayerWantedLevelEx(playerid);
InShamal[playerid] = 0;
InAndrom[playerid] = 0;
CopOnDuty[playerid] = 0;
if(Planted[playerid] == 1)
{
DestroyObject(C4[playerid]);
Bomb[playerid] = 0;
Planted[playerid] = 0;
}
return 1;
}
Re: How can i do this? -
Haydz - 24.11.2010
lol at above,
you would somthing like this
https://sampwiki.blast.hk/wiki/ForceClassSelection
so like
pawn Код:
Public OnPlayerDeath(playerid, killerid, reason)
{
ForceClassSelection(playerid);
//the rest of your stuff here.
}
Re: How can i do this? -
mtywe - 24.11.2010
But wouldnt that be the cuase of the problem? if its not there after player death or on player spawn.... (in the code)
Re: How can i do this? -
mtywe - 24.11.2010
Ok, well for a revision of my first post for those who do not undertand, When class selection is shown after a player spawns from a death, their skin changes to CJ... But on the second death the class selection does not popup, and does not change the players skin to CJ. Now i want to know how to make it so that when a player spawns no class selection is shown/available.
Re: How can i do this? -
Nushi - 24.11.2010
Just leave it blank like this for now, test it. Then, starting adding code blocks, if it keeps happening, then something in your "OnPlayerSpawn" is the problem.
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}