[HELP]realchat not working if on a anim
#1

Well i am having this problem when i am on a anim like example /crack and i talk it doesn't show anything,but when i am not using a anim and i right a text it works i can see what is the problem?
Код:
if (realchat)
	{
			if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT && usinganim[playerid] == 0)
	{
	  if(gPlayerLogged[playerid] == 0)
	  {
	    return 0;
   	}

   	  MaskNumber[playerid] = 1000+random(8999);
		GetPlayerName(playerid, sendername, sizeof(sendername));
			new lengthtime = strlen(text);
          new aTime = lengthtime*100;

new time = lengthtime*100;
	
		if(!IsPlayerInAnyVehicle(playerid))
		{

			if(PlayerInfo[playerid][pMaskuse] == 1)
			{

				format(string, sizeof(string), "[Mask_%d_70] Says: %s",PlayerInfo[playerid][pMaskNumber], text);

				 ApplyAnimation(playerid,"PED", "IDLE_CHAT",4.1,0,1,1,1,1);
			  SetTimerEx("StopTalking",time,0,"i",playerid);
				ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
			}
			else
			{
		  	format(string, sizeof(string), "%s Says: %s", sendername, text);

    	 ApplyAnimation(playerid,"PED", "IDLE_CHAT",4.1,0,1,1,1,1);
			  SetTimerEx("StopTalking",time,0,"i",playerid);
		  	ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
			}
		}
		else
		{
       MaskNumber[playerid] = 1000+random(8999);
		  new carid = GetPlayerVehicleID(playerid);
		  new pveh = GetVehicleModel(GetPlayerVehicleID(playerid));
		  if(IsABike(carid) || IsAOBike(carid) || IsAPizzabike(carid) || IsAPlane(carid) || IsABoat(carid) || IsASweeper(carid) || IsAHarvest(carid) || IsADrugHarvest(carid) || IsATank(carid) || pveh == 523 || pveh == 480 || pveh == 567 || pveh == 533 || pveh == 555 || pveh == 539 || pveh == 572 || pveh == 571 || pveh == 530 || pveh == 457 || pveh == 575 || pveh == 536 || pveh == 424)
		  {

		    if(PlayerInfo[playerid][pMaskuse] == 1)
				{

           format(string, sizeof(string), "[Mask_%d_70] Says: %s",PlayerInfo[playerid][pMaskNumber], text);
          //ApplyAnimation(playerid,"GANGS","prtial_gngtlkD", 4.1, 0, 1, 0, 0,aTime);
				  //SetTimerEx("StopTalk",floatround(strlen(text)/9)*200, 0, "i", playerid);
					ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
				}
				else
				{

		  		format(string, sizeof(string), "%s Says: %s", sendername, text);
  				  //ApplyAnimation(playerid,"GANGS","prtial_gngtlkD", 4.1, 0, 1, 0, 0,aTime);
				  //SetTimerEx("StopTalk",floatround(strlen(text)/9)*200, 0, "i", playerid);
		  		ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
				}
		  }
		  else
		  {
		  	if(VehicleWindows[GetPlayerVehicleID(playerid)] == 0)
		  	{
		  		if(PlayerInfo[playerid][pMaskuse] == 1)
					{


					MaskNumber[playerid] = 10000+random(8999);
							format(string, sizeof(string), "[Mask_%d_70] Says: %s",PlayerInfo[playerid][pMaskNumber], text);
				 //ApplyAnimation(playerid,"GANGS","prtial_gngtlkD", 4.0, 0, 0, 0, 0,aTime);
				  //SetTimerEx("StopTalk",floatround(strlen(text)/9)*200, 0, "i", playerid);
						ProxDetector(10.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
					}
					else
					{
		  			format(string, sizeof(string), "(Windows Shut) %s Says: %s", sendername, text);
		  	 //ApplyAnimation(playerid,"GANGS","prtial_gngtlkD", 4.0, 0, 0, 0, 0,aTime);
				  // SetTimerEx("StopTalk",floatround(strlen(text)/9)*200, 0, "i", playerid);
		  			ProxDetector(10.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
					}
				}
				else
				{   MaskNumber[playerid] = 1000+random(8999);
			  	if(PlayerInfo[playerid][pMaskuse] == 1)
					{

						format(string, sizeof(string), "[Mask_%d_70] Says: %s",PlayerInfo[playerid][pMaskNumber], text);
				 //ApplyAnimation(playerid,"GANGS","prtial_gngtlkD", 4.0, 0, 0, 0, 0,aTime);
				  //SetTimerEx("StopTalk",floatround(strlen(text)/9)*200, 0, "i", playerid);
						ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
					}
					else
					{
		  			format(string, sizeof(string), "[Mask_%d_70] Says: %s",PlayerInfo[playerid][pMaskNumber], text);
		  	 //ApplyAnimation(playerid,"GANGS","prtial_gngtlkD", 4.1, 0, 0, 0, 0,aTime);
				  // SetTimerEx("StopTalk",floatround(strlen(text)/9)*200, 0, "i", playerid);
		  			ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
					}
				}
			}
		 }
		}
		return 0;
	}
	return 1;
}
Reply
#2

Bump
Reply
#3

l2indent
Reply
#4

Yeah indent your code, Assuming thats what you mean, Idk what the l2 is for

Click me to indent!
Reply
#5

l2 = learn to
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)