20.11.2013, 18:48
I want to make an /acceptgreet command but.. How do I play the animation for both players? I need a global variable or something?
pawn Код:
CMD:greet(playerid, params[])
{
new id, number, string[64], Float:X, Float:Y, Float:Z;
GetPlayerPos(id, X, Y, Z);
if(sscanf(params,"u", id)) return SCM(playerid, COLOR_GREY,"[Usage]: /greet [playerid/partofname] [greet (0-6)].");
if(playerid == id) return SCM(playerid, COLOR_LIGHTRED,"[Error]: You can't greet yourself.");
if(IsPlayerInRangeOfPoint(playerid, 7.0, X, Y, Z))
{
format(string, sizeof(string), "* %s would like to greet you, /acceptgreet.", GetName(playerid));
SendClientMessage(playerid, COLOR_GOLD, string);
greetInvited[id] = true;
} else return SCM(playerid, COLOR_LIGHTRED, "[Error]: You're not close enough.");
return 1;
}
CMD:acceptgreet(playerid, params[])
{
if(greetInvited[playerid] == false) return SCM(playerid, COLOR_LIGHTRED,"[Error]: You're not invited to greet anyone");
ApplyAnimation(playerid, "GANGS", "hndshkaa", 4.1, 0, 1, 1, 1, 1, 1);
ApplyAnimation( ??, "GANGS", "hndshkaa", 4.1, 0, 1, 1, 1, 1, 1);
return 1;
}