/greet
#1

/greet works fine, it sends the message but /acceptgreet doesn't work for some reason and doesn't apply any animation at all.

PHP код:
CMD:greet(playeridparams[])
{
    new 
idnumberstring[128], Float:XFloat:YFloat:Z;
    
GetPlayerPos(idXYZ);
    if(
sscanf(params,"u"idnumber)) return SCM(playeridCOLOR_GREY,"[Usage]: /greet [playerid/partofname] [greet (0-6)].");
    if(
playerid == id) return SCM(playeridCOLOR_LIGHTRED,"[Error]: You can't greet yourself.");
    if(
IsPlayerInRangeOfPoint(playerid7.0XYZ))
    {
         
format(stringsizeof(string), "%s would like to greet you. Type /acceptgreet if you further wish."GetName(playerid));
        
SendClientMessage(idCOLOR_YELLOWstring);
        
greetInvited[id] = true;
        
greetNumber number;
          
Player_Greet[id] = playerid;
    }
    else return 
SCM(playeridCOLOR_LIGHTRED"[Error]: You're not close enough.");
      return 
1;
}
CMD:acceptgreet(playeridparams[])
{
    if(
greetInvited[playerid] == false) return SCM(playeridCOLOR_LIGHTRED,"[Error]: You're not invited to greet anyone");
    if(
greetNumber == 1)
    {
        
ApplyAnimation(playerid"GANGS""hndshkfa"4.1011111);
        
ApplyAnimation(Player_Greet[playerid], "GANGS""hndshkfa"4.1011111);
    }
    else if(
greetNumber == 2)
    {
        
ApplyAnimation(playerid"GANGS""hndshkaa"4.1011111);
         
ApplyAnimation(Player_Greet[playerid], "GANGS""hndshkaa"4.1011111);
    }
    else if(
greetNumber == 3)
    {
        
ApplyAnimation(playerid"GANGS""hndshkba"4.1011111);
         
ApplyAnimation(Player_Greet[playerid], "GANGS""hndshkba"4.1011111);
    }
    else if(
greetNumber == 4)
    {
        
ApplyAnimation(playerid"GANGS""hndshkca"4.1011111);
         
ApplyAnimation(Player_Greet[playerid], "GANGS""hndshkca"4.1011111);
    }
    else if(
greetNumber == 5)
    {
        
ApplyAnimation(playerid"GANGS""hndshkda"4.1011111);
         
ApplyAnimation(Player_Greet[playerid], "GANGS""hndshkda"4.1011111);
    }
    else if(
greetNumber == 6)
    {
        
ApplyAnimation(playerid"GANGS""hndshkea"4.1011111);
        
ApplyAnimation(Player_Greet[playerid], "GANGS""hndshkea"4.1011111);
    }
    return 
1;

Reply
#2

Because in your greet cmd you have two parameters yet you defined one.
Reply
#3

Will I just add Player_Greet[id] = playerid; into cmd:acceptgreet?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)