SA-MP Forums Archive
wont work ? - 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: wont work ? (/showthread.php?tid=108740)



wont work ? - Lajko1 - 15.11.2009

guys why this on my public OnPlayerText wont work ?

this 2 things works great:

Код:
public OnPlayerText(playerid, text[])
{
  if (strcmp(text, "1", true) == 0)
	{
		if (IsInArmsJobCp[playerid] == 1)
		{
		TextDrawHideForPlayer(playerid,Text:Textdraw0);
  	TextDrawHideForPlayer(playerid,Text:Textdraw1);
  	TextDrawHideForPlayer(playerid,Text:Textdraw2);
  	TextDrawHideForPlayer(playerid,Text:Textdraw3);
  	TextDrawHideForPlayer(playerid,Text:Textdraw4);
  	TextDrawHideForPlayer(playerid,Text:Textdraw5);
  	TextDrawHideForPlayer(playerid,Text:Textdraw6);
	 	TextDrawHideForPlayer(playerid,Text:Textdraw7);
	 	
		TextDrawShowForPlayer(playerid,Textdraw8);
		TextDrawShowForPlayer(playerid,Textdraw9);
		TextDrawShowForPlayer(playerid,Textdraw10);
		TextDrawShowForPlayer(playerid,Textdraw11);
		TextDrawShowForPlayer(playerid,Textdraw12);
		TextDrawShowForPlayer(playerid,Textdraw13);
		TextDrawShowForPlayer(playerid,Textdraw14);
		TextDrawShowForPlayer(playerid,Textdraw15);
		TextDrawShowForPlayer(playerid,Textdraw16);
		TextDrawShowForPlayer(playerid,Textdraw17);
		TextDrawShowForPlayer(playerid,Textdraw18);
		TextDrawShowForPlayer(playerid,Textdraw19);
		TextDrawShowForPlayer(playerid,Textdraw20);
		TextDrawShowForPlayer(playerid,Textdraw21);
		
		return 0;
		}
		if(IsInCarShop[playerid] == 1)
		{
		if(GetPlayerMoney(playerid) >= 42999)
		{
		SendClientMessage(playerid,0xFF0000AA,"You Don't Have Enough Money To Buy This Vehicle!");
		TogglePlayerControllable(playerid,1);
		
		TextDrawHideForPlayer(playerid,Text:Textdraw22);
		TextDrawHideForPlayer(playerid,Text:Textdraw23);
		TextDrawHideForPlayer(playerid,Text:Textdraw24);
		TextDrawHideForPlayer(playerid,Text:Textdraw25);
		TextDrawHideForPlayer(playerid,Text:Textdraw26);
		TextDrawHideForPlayer(playerid,Text:Textdraw27);
		TextDrawHideForPlayer(playerid,Text:Textdraw28);
		TextDrawHideForPlayer(playerid,Text:Textdraw29);
		TextDrawHideForPlayer(playerid,Text:Textdraw30);
		TextDrawHideForPlayer(playerid,Text:Textdraw31);
		TextDrawHideForPlayer(playerid,Text:Textdraw32);
		TextDrawHideForPlayer(playerid,Text:Textdraw33);
		TextDrawHideForPlayer(playerid,Text:Textdraw34);
		return 0;
		}
		if(GetPlayerMoney(playerid) >= 43000)
		{
		GivePlayerMoney(playerid,-43000);
		TogglePlayerControllable(playerid,1);
		IsAlreadyBuyedCar[playerid] = 1;
		
		TextDrawHideForPlayer(playerid,Text:Textdraw22);
		TextDrawHideForPlayer(playerid,Text:Textdraw23);
		TextDrawHideForPlayer(playerid,Text:Textdraw24);
		TextDrawHideForPlayer(playerid,Text:Textdraw25);
		TextDrawHideForPlayer(playerid,Text:Textdraw26);
		TextDrawHideForPlayer(playerid,Text:Textdraw27);
		TextDrawHideForPlayer(playerid,Text:Textdraw28);
		TextDrawHideForPlayer(playerid,Text:Textdraw29);
		TextDrawHideForPlayer(playerid,Text:Textdraw30);
		TextDrawHideForPlayer(playerid,Text:Textdraw31);
		TextDrawHideForPlayer(playerid,Text:Textdraw32);
		TextDrawHideForPlayer(playerid,Text:Textdraw33);
		TextDrawHideForPlayer(playerid,Text:Textdraw34);
		return 0;
		}
		}
i mean allmost great i must fix some things leter

but this wont work for if i press number 2

Код:
if (strcmp(text, "2", true) == 0)
		{
	  if (IsInArmsJobCp[playerid] == 1)
	  {
	  TextDrawHideForPlayer(playerid,Text:Textdraw0);
  	TextDrawHideForPlayer(playerid,Text:Textdraw1);
  	TextDrawHideForPlayer(playerid,Text:Textdraw2);
  	TextDrawHideForPlayer(playerid,Text:Textdraw3);
  	TextDrawHideForPlayer(playerid,Text:Textdraw4);
  	TextDrawHideForPlayer(playerid,Text:Textdraw5);
  	TextDrawHideForPlayer(playerid,Text:Textdraw6);
	 	TextDrawHideForPlayer(playerid,Text:Textdraw7);
	 	
	 	TextDrawShowForPlayer(playerid,Text:Textdraw35);
	 	TextDrawShowForPlayer(playerid,Text:Textdraw36);
	 	TextDrawShowForPlayer(playerid,Text:Textdraw37);
	 	TextDrawShowForPlayer(playerid,Text:Textdraw38);
	 	TextDrawShowForPlayer(playerid,Text:Textdraw39);
	 	TextDrawShowForPlayer(playerid,Text:Textdraw40);
	 	TextDrawShowForPlayer(playerid,Text:Textdraw41);
	 	TextDrawShowForPlayer(playerid,Text:Textdraw42);
	 	
	 	return 0;
	 	}
		}
		return 1;
	}
	return 1;
}
and let me say i was so confused with this returns i dont even know if i script those thigs OK

ty for any help


Re: wont work ? - Lajko1 - 15.11.2009

cmon guys i know you can help

EDIT: Nobody , i can post more of code if its needed