17.12.2009, 17:08
This is for my IntelliNPC:
pawn Код:
if (strfind(text, "Can i get my present?") != -1)
{
GetPlayerPos(npcid,x,y,z);
if(IsPlayerInRangeOfPoint(playerid,10,x,y,z))
{
if(IsPlayerFacingPlayer(playerid,npcid,10) == 1)
{
if(Presentplayer[playerid] == 0)
{
Presentplayer[playerid] = 1;
GivePlayerMoney(playerid, 10000000);
PlayerInfo[playerid][pLevel] += 10;
SetPlayerFacingPlayer(npcid,playerid);
SetPlayerChatBubble(npcid,"Sure, one moment!",0xFFFFFFAA,50,5000);
amount[playerid] = 7;
}
else
{
SetPlayerFacingPlayer(npcid,playerid);
SetPlayerChatBubble(npcid, "You have already got a present!",0xFFFFFFAA,50,5000);
}
}
}
}