Greet command
#1

I made this so far:

Код:
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;
}
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
Reply
#2

The kiss ID
pawn Код:
LoopingAnim(playerid, "KISSING", "Playa_Kiss_02", 3.0, 1, 1, 1, 1, 0);
if you want to check if they are close to each other use IsPlayerInRangeOfPoint.
Reply
#3

i can use ProxDetectorS
but how do i exactly check, if the player is in the right position.
if the player turns with his back?
Reply
#4

I don't think that's possible.
Reply
#5

Gave me a perfect idea. There IS a way to detect if the players are opposite, get their both facing angles and if the difference is around 180, they're standing in front of eachother.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)