20.05.2011, 15:41
hello i need help with something i want to say hello in game while i saye hello i want to make the person move his hands like in the anim plz help and sorry for bad language
new WaveTexts[][3] = { "Hello", "Hi", "Wazap" }; // [3] means, that there are 3 words only. You can add your own ones..
public OnPlayerText(playerid, text[])
{
for(new Order = 0; Order < sizeof(WaveTexts); Order++) // Will search if player (playerid) write one of WaveTexts's text
{
if(strfind(text, WaveTexts[Order], true) != -1)
{
ApplyPlayerAnimation(playerid, ...)
ApplyPlayerAnimation(playerid, ...)// Sorry, but forget the code for wave animation. Hope you'll find it out for yourself :) PS. Duplicate this function, to be sure that it will works!
return 1;
}
}
}
OnPlayerText(playerid, text[])
{
if(IsPlayerConnected(playerid)) // Checks if playerid is connected
{
ApplyPlayerAnimation(playerid,"PED","IDLE_CHAT",4.0,1,0,0,1,1);
return 1;
}
return 1;
}
OnPlayerText(playerid, text[])
{
if(IsPlayerConnected(playerid)) // Checks if playerid is connected
{
// action what have to be done while player write something..
// try return 1; or without and check, if the warning 225 is appear.
}
return 1;
#pragma tabsize 0
public OnPlayerText(playerid, text[]){
// Action (without anything, place it just after public)
// below should be rest of the code (if exist)
return 1;
}
public OnPlayerText(playerid, text[]){
ApplyPlayerAnimation(playerid,"PED","IDLE_CHAT",4. 0,1,0,0,1,1);
return 1;
}
//Of course an undefined, it doesn't exist.. -.-"
ApplyAnimation(playerid,"PED","WALK_DRUNK",4.1,1,1,1,1,1,1);