[HELP]Realchat not working properly
#1

Well im trying to make realchat so when a players talk in InCharector Chat and hes in a anim,his hands doesn't move i tried to do it but it didn't work at all heres my code:
Код:
if (realchat)
	{
		if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT && GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_NONE)
				{
    new time=strlen(text)*100;
    new idcar = GetPlayerVehicleID(playerid);
    GetPlayerName(playerid, sendername, sizeof(sendername));
    GiveNameSpace(sendername);
    if(PlayerInfo[playerid][pMaskUse] == 1) { format(sendername, sizeof(sendername), "[Mask_%d_38]", RandMask[playerid]); }
    	if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT && GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_NONE)
		{
    ApplyAnimation(playerid,"PED", "IDLE_CHAT",4.1,0,1,1,1,1);
    SetTimerEx("StopTalking",time,0,"i",playerid);
    
    if(LiveOffer[playerid][0] == 1)
	  {
      if(PlayerInfo[playerid][pMember] == 5)
		  {
		    format(string, sizeof(string), "LiveNR %s: %s", sendername, text);
		  }
		  else
		  {
		    format(string, sizeof(string), "Live interview %s: %s", sendername, text);
		  }
	    SendNewsMessage(COLOR_LIGHTGREEN, string);
	    return 0;
	  }
	  else if(LiveOffer[playerid][1] == 1)
	  {
      if(PlayerInfo[playerid][pMember] == 6)
		  {
		    format(string, sizeof(string), "[TFMR Broadcaster] %s: %s", sendername, text);
		  }
		  else
		  {
		    format(string, sizeof(string), "[TFMR Guest] %s: %s", sendername, text);
		  }
	    SendRadio2Message(0xFFA04296, string);
	    return 0;
	  }
	  else if(LiveOffer[playerid][2] == 1)
	  {
      if(PlayerInfo[playerid][pMember] == 11)
		  {
		    format(string, sizeof(string), "[RLS Broadcaster] %s: %s", sendername, text);
		  }
		  else
		  {
		    format(string, sizeof(string), "[RLS Guest] %s: %s", sendername, text);
		  }
	    SendClientMessageToAll(COLOR_LIGHTGREEN, string);
	    return 0;
	  }
    else if (IsPlayerInAnyVehicle(playerid) && IsAWindowCar(playerid))
    {
			if(VehicleWindows[idcar] == 0)
			{
		  format(string, sizeof(string), "[Windows Shut]: %s %s: %s", sendername, PlayerInfo[playerid][pAccent], text);
			}
			else if(VehicleWindows[idcar] == 1)
			{
		  format(string, sizeof(string), "[Windows Open]: %s %s: %s", sendername, PlayerInfo[playerid][pAccent], text);
			}
		}
		else
		{
		
		  format(string, sizeof(string), "%s %s: %s", sendername, PlayerInfo[playerid][pAccent], text);
		  ApplyAnimation(playerid,"PED", "IDLE_CHAT",4.1,0,1,1,1,1);
      SetTimerEx("StopTalking",time,0,"i",playerid);
		}
		ProxDetector(30.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
	
      }

		 }
		return 0;
	}
	return 1;
}
forward StopTalking(playerid);
public StopTalking(playerid)
{
  ApplyAnimationEx(playerid, "CARRY", "crry_prtial", 2.0, 0, 0, 0, 0, 0);
}
Reply


Messages In This Thread
[HELP]Realchat not working properly - by Lilcuete - 05.06.2010, 02:27
Re: [HELP]Realchat not working properly - by Lilcuete - 05.06.2010, 12:52
Re: [HELP]Realchat not working properly - by Lilcuete - 05.06.2010, 23:49
Re: [HELP]Realchat not working properly - by Lilcuete - 16.06.2010, 02:37
Re: [HELP]Realchat not working properly - by Antonio [G-RP] - 16.06.2010, 02:42
Re: [HELP]Realchat not working properly - by Johndaone - 16.06.2010, 04:20
Re: [HELP]Realchat not working properly - by Lilcuete - 17.06.2010, 00:50
Re: [HELP]Realchat not working properly - by Lilcuete - 18.06.2010, 20:34
Re: [HELP]Realchat not working properly - by Mike Garber - 18.06.2010, 20:44
Re: [HELP]Realchat not working properly - by Lilcuete - 19.06.2010, 14:10

Forum Jump:


Users browsing this thread: 2 Guest(s)