OnPlayerDeath and Spawn bug - 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: OnPlayerDeath and Spawn bug (
/showthread.php?tid=280075)
OnPlayerDeath and Spawn bug -
BCRP - 30.08.2011
Hallo!
I have found bug,
If player death then he spawn to hospital and i loast 100$
And spawn this object
Anybody can help?
Re: OnPlayerDeath and Spawn bug -
=WoR=Varth - 30.08.2011
Show us your OnPlayerDeath
Re: OnPlayerDeath and Spawn bug -
BCRP - 30.08.2011
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(IsPlayerNPC(playerid)) { return 0; }
M2ngijaInfo[playerid][pVangis] = 2;
M2ngijaInfo[playerid][pVanglaaeg] = 250;
M2ngijaInfo[playerid][pPos_x] = -1501.4834;
M2ngijaInfo[playerid][pPos_y] = 2523.0188;
M2ngijaInfo[playerid][pPos_z] = 16985.0488;
HaiglaMinekTaimer[playerid] = SetTimerEx("HaiglaMinek",3600,false,"i",playerid);
TextDrawHideForPlayer(playerid,txtTimeDisp);
new caller = Mobile[playerid];
if(caller != 255)
{
if(caller < 255)
{
SendClientMessage(caller, COLOR_GRAD2, " Kхne katkes jдrsku....");
CellTime[caller] = 0;
CellTime[playerid] = 0;
Mobile[caller] = 255;
}
Mobile[playerid] = 255;
CellTime[playerid] = 0;
}
ClearCrime(playerid);
for(new x=0; x<MAX_PLAYERS; x++)
if(GetPlayerState(x) == PLAYER_STATE_SPECTATING && M2ngijaInfo[x][pSpecID] == playerid)
SpecEdasi(x);
return 1;
}
Estonia language is
Re: OnPlayerDeath and Spawn bug -
=WoR=Varth - 30.08.2011
Show us your HaiglaMinek callback.
Re: OnPlayerDeath and Spawn bug -
BCRP - 30.08.2011
pawn Код:
public HaiglaMinek(playerid)
{
if(M2ngijaInfo[playerid][pVangis] == 2)
{
KillTimer(HaiglaMinekTaimer[playerid]);
M2ngijaInfo[playerid][pProsad] = 200;
ShowPlayerAchievement(playerid, "Haigla Arstid !", "Sa 2rkasid haiglas ja sul on m2lukaotus .", 7500);
SetPlayerPos(playerid, -1501.4834,2523.0188,16985.0488);
SetPlayerInterior(playerid, 3);
}
return 1;
}
Re: OnPlayerDeath and Spawn bug -
=WoR=Varth - 30.08.2011
Nothing create an object in both of those code.
The object created somewhere else.
Re: OnPlayerDeath and Spawn bug -
Improvement™ - 30.08.2011
Yea.. I also experience this once in awhile in my server. Sometimes if I spawn and suddenly theres a small bottle floating in the air. And its actually really bothering me because I want to perfectionize the server. And to fix as many "bugs" as possible. But seems to me that this is a Client-sided issue? Perhaps because of the newest SA:MP Versions of R3 R4 R5. But who knows, this might be fixed already.
Re: OnPlayerDeath and Spawn bug -
BCRP - 30.08.2011
but whay i lost the money?
Re: OnPlayerDeath and Spawn bug -
=WoR=Varth - 30.08.2011
That's default samp config. If you don't want to loose your money, just GivePlayerMoney in your OnPlayerDeath