Kreed
Умник
В public OnPlayerCommandText
Далее ставим в низ где нибудь рядом со stock
Автор: Ozukiel
PHP:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmd, "/kiss", true,5) == 0)
{
if(GetPlayerState(playerid)!=PLAYER_STATE_ONFOOT) return 1;
giveplayerid=GetClosestPlayer(playerid);
if(GetDistanceBetweenPlayers(playerid,giveplayerid) > 2) return SendClientMessage(playerid, COLOR_GREY, "Нет ни кого рядом");
SetPosInFrontOfPlayer(playerid,giveplayerid,1);
new Float:a;GetPlayerFacingAngle(playerid,a);
SetPlayerFacingAngle(giveplayerid,180+a);
ApplyAnimation(playerid,"BD_FIRE","GRLFRD_KISS_03",4.0,0,0,0,0,0);
ApplyAnimation(giveplayerid,"BD_FIRE","PLAYA_KISS_03",4.0,0,0,0,0,0);
// ApplyAnimation(playerid,"KISSING","Playa_Kiss_01",4.0,0,0,0,0,0);
return 1;
}
Далее ставим в низ где нибудь рядом со stock
PHP:
SetPosInFrontOfPlayer(playerid,giveplayerid,Float:distance)
{
new Float:x,Float:y,Float:z,Float:a;
GetPlayerPos(playerid, x, y,z);GetPlayerFacingAngle(playerid, a);
x += (distance * floatsin(-a, degrees));
y += (distance * floatcos(-a, degrees));
SetPlayerPos(giveplayerid,x,y,z);SetPlayerFacingAngle(giveplayerid,a);
}
