SA-MP Forums Archive
Problem - Please Help! - 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: Problem - Please Help! (/showthread.php?tid=80868)



Problem - Please Help! - Andron - 06.06.2009

So I have problem with my script. Im using GF and I made an hospital system.
But now I have problem. Script is saying everything TWICE. Dunno why. Example, if I put in code "SendClientMessage(playerid, "Hello");
then he will send this message twice ingame..Example
IG : HELLO
HELLO

Anyweyz here is a code..

Код:
public HaiglaTime(playerid)
{
	if(IsPlayerConnected(playerid))
	{
	  TogglePlayerControllable(playerid, 1);
	}
}

public SurmTime(playerid)
{
	if(IsPlayerConnected(playerid))
	{
	  TogglePlayerControllable(playerid, 0);
	  ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
	  SetPlayerFacingAngle(playerid, 269.261383);
	  SetTimerEx("Haigla2Time", 4000, false, "i", playerid);
	  SendClientMessage(playerid, COLOR_WHITE, "Arst: Te peate nььd puhkama.");
	}
}

public Haigla2Time(playerid)
{
	if(IsPlayerConnected(playerid))
	{
	  TogglePlayerControllable(playerid, 1);
	  SetPlayerPos(playerid, -2656.0393,635.0596,14.4531);
	  SetPlayerInterior(playerid,0);
		new string[256];
    new cut = deathcost; //PlayerInfo[playerid][pLevel]*deathcost;
		GivePlayerMoney(playerid, -cut);
		format(string, sizeof(string), "Doktor: Sa oled tдielikult paranenud, kulud on $%d.", deathcost);
		SendClientMessage(playerid, TEAM_CYAN_COLOR, string);
		format(string, sizeof(string), "Doktor: Kahjuks on teil mдluauk. Arvatavasti lдheb see varsti ьle.");
		SendClientMessage(playerid, TEAM_CYAN_COLOR, string);
		MedicBill[playerid] = 0;
		MedicTime[playerid] = 0;
		NeedMedicTime[playerid] = 0;
		PlayerInfo[playerid][pDeaths] += 1;
	}
}
Can somone help? Or can you see the problem, why skript says TWICE everything..


Re: Problem - Please Help! - cigo - 06.06.2009

what this command does? does it happens to all ''SendClientMessage'' lines?


Re: Problem - Please Help! - Andron - 06.06.2009

I fixed it. Problem solved.