new message[144];
if(enabledtalk)
{
return 1;
}
else if(!enabledtalk)
{
format(message, sizeof(message), "%s says: %s", GetOOCName(playerid), text);
NearMessageSender(playerid, 5, message, COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE);
ApplyAnimation(playerid,"PED","IDLE_CHAT",4.1,1,1, 1,1,time);
return 0;
}
return 1;
}
new lengthtime = strlen(text);
new time = lengthtime*50;
ApplyAnimation(playerid,"PED","IDLE_CHAT",4.0,0,0,0,0,time);
format (textv2, sizeof (textv2), "%s says:%s", GetOOCName(playerid), params);
NearMessageSender (playerid, 15, textv2, COLOR_RADIO, COLOR_RADIO, COLOR_RADIO, COLOR_RADIO, COLOR_RADIO);
SetPlayerSpecialAction (playerid, SPECIAL_ACTION_USECELLPHONE);
solved ... I have a similar problem.
I would like to enter the anim when you picked up the phone for a few seconds and then it disappears. PHP код:
SPECIAL_ACTION_STOPUSECELLPHONE The problem is that I do not know how to do. |
public OnPlayerText(playerid, text[])
{
new textv2[128];
format (textv2, sizeof (textv2), "%s says:%s", GetOOCName(playerid), params);
NearMessageSender (playerid, 15, textv2, COLOR_RADIO, COLOR_RADIO, COLOR_RADIO, COLOR_RADIO, COLOR_RADIO);
SetPlayerSpecialAction (playerid, SPECIAL_ACTION_USECELLPHONE);
SetTimerEx("Stopanim",5000,false,"d",playerid);//1000 milliseconds equal 1 second
return 1;
}
forward Stopanim(playerid);
public Stopanim(playerid)
{
SetPlayerSpecialAction (playerid, SPECIAL_ACTION_NONE);//reset his special action
return 1;
}