13.12.2012, 17:00
I made this so far:
I don't know the anims type or ID for handshake and KISS, and how to add check if players infront of each other.
like face to face
Код:
CMD:greet(playerid, params[])
{
new pid, type, string[256];
if(sscanf(params,"dd",pid,type)) {
SCM(playerid, COLOR_GREY, "USAGE: /greet [playerid] [style]");
SCM(playerid, COLOR_GREEN, "[1] Kiss [2] Handshake [3] Handshake [4] Handshake [5] Handshake");
SCM(playerid, COLOR_GREEN, "[6] Handshake [7] Handshake [8] Handshake [9] Handshake [10] Handshake");
return 1;
}
if(pid == playerid) return SCM(playerid, COLOR_GREY, "You cannot greet yourself");
if(!IsPlayerConnected(pid)) return SCM(playerid, COLOR_GREY, "SERVER: This player is not connected");
if(!ProxDetectorS(3.5, playerid, pid)) return SCM(playerid, COLOR_LIGHTRED, "SERVER: That player is too far from you.");
sentGreet[playerid] = 1;
greetFrom[pid] = playerid;
format(string, sizeof(string), "* You have sent to %s a greet request.", GetName(pid));
SCM(playerid, COLOR_LIGHTGREEN, string);
format(string, sizeof(string), "* %s has sent you a greet request /acceptshake [playerid] to accept.", GetName(playerid));
SCM(pid, COLOR_LIGHTGREEN, string);
return 1;
}
like face to face

