SA-MP Forums Archive
a bug :O? - 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: a bug :O? (/showthread.php?tid=240826)



a bug :O? - Madsen - 16.03.2011

hey i have made a shotgunwar, m4war and minigunwar
when in the wars you will lose 10 dollars when you die.
but when you die you lose 10 dollars then respawn and lose 100 dollars


Re: a bug :O? - Snipa - 16.03.2011

Post your OnPlayerDeath and OnPlayerSpawn


Re: a bug :O? - Madsen - 16.03.2011

OnPlayerDeath
Код:
if(sw[playerid] == 1)
	{
	    SendClientMessage(killerid, COLOR_GREEN, "You got a bonus for killing a player in sw");
		SendClientMessage(killerid, COLOR_GREEN, "( $ ) +150");
		GivePlayerMoney(killerid, 150);
		SendClientMessage(playerid, COLOR_NORMALRED, "( $ ) -10");
		GivePlayerMoney(playerid, -10);
	}
	else
	if(m4w[playerid] == 1)
	{
	    SendClientMessage(killerid, COLOR_GREEN, "You got a bonus for killing a player in m4w");
		SendClientMessage(killerid, COLOR_GREEN, "( $ ) +150");
		GivePlayerMoney(killerid, 150);
		SendClientMessage(playerid, COLOR_NORMALRED, "( $ ) -10");
		GivePlayerMoney(playerid, -10);
	}
	else
	if(mgw[playerid] == 1)
	{
	    SendClientMessage(killerid, COLOR_GREEN, "You got a bonus for killing a player in mgw");
		SendClientMessage(killerid, COLOR_GREEN, "( $ ) +200");
		GivePlayerMoney(killerid, 200);
		SendClientMessage(playerid, COLOR_NORMALRED, "( $ ) -10");
		GivePlayerMoney(playerid, -10);
	}
	else
	if(m4w[playerid] == 0 || sw[playerid] == 0 || mgw[playerid] == 0)
 	{
		SendClientMessage(killerid, COLOR_GREEN, "You just killed a player");
		SendClientMessage(killerid, COLOR_GREEN, "( $ ) +100");
		GivePlayerMoney(killerid, 100);
		SendClientMessage(playerid, COLOR_NORMALRED, "( $ ) -10");
		GivePlayerMoney(playerid, -10);
	}
OnPlayerSpawn
Код:
{
    SetPlayerArmour(playerid, 100);


    if(sw[playerid] == 1)
    {
	SetPlayerInterior(playerid, 17);
	SetPlayerPos(playerid, -19.0286,-175.3378,1003.5469);
    SetPlayerFacingAngle(playerid, 330.8037);
    GivePlayerWeapon(playerid, 25, 1000);
    SetPlayerHealth(playerid, 100);
    SetPlayerArmour(playerid, 50);
    }
	else
    if(m4w[playerid] == 1)
    {
	SetPlayerInterior(playerid, 1);
	SetPlayerPos(playerid, 2256.4790,1611.7258,1006.1797);
    SetPlayerFacingAngle(playerid, 273.1208);
    GivePlayerWeapon(playerid, 31, 1000);
    SetPlayerHealth(playerid, 100);
    }
    else
    if(mgw[playerid] == 1)
    {
	SetPlayerInterior(playerid, 1);
	SetPlayerPos(playerid, 2176.6042,1613.3317,999.9766);
    SetPlayerFacingAngle(playerid, 269.1238);
    GivePlayerWeapon(playerid, 38, 111110); // minigun
    SetPlayerHealth(playerid, 200);
    }
	else
  	if(m4w[playerid] == 0 || sw[playerid] == 0 || mgw[playerid] == 0)
  	{
	(m4w[playerid] = 0);
	(mgw[playerid] = 0);
	(sw[playerid] = 0);
	}
	return 1;



Re: a bug :O? - Madsen - 17.03.2011

my friend said it might be standard that people lose 100 dollars when they die??.


Re: a bug :O? - Madsen - 17.03.2011

is there no way to remove it as standard :O?


Re: a bug :O? - grand.Theft.Otto - 17.03.2011

This bug happens to me too No, I don't think it is possible to remove it. It may have been reported to the SA-MP team as a queue fix.

Use ******'s solution, I will also do it too because it happens on my server.

Thanks!


Re: a bug :O? - Madsen - 17.03.2011

okay thx for the help, if anyway discover the problem post on this thread plz


Re: a bug :O? - Madsen - 20.03.2011

Quote:
Originally Posted by ******
Посмотреть сообщение
We just told you the problem and the fix - what more do you want?
i want the bug not to accur thats what i want...