mura Posted May 8, 2011 Report Share Posted May 8, 2011 Imi puteti da va rog frumos un script in pawno pentru ca npc-ul sa te urmeze?Am gasit ceva dar nu cred ca e bun:public OnPlayerText(playerid, text[]){ new JackID = GetPlayerID("Jack"); new Float:x,Float:y,Float:z; GetPlayerPos(JackID,x,y,z); if(IsPlayerFacingPlayer(playerid,JackID,10.0)) { if(strfind(text, "Follow me") != -1 && IsPlayerInRangeOfPoint(playerid,5.0,x,y,z)) { SetPlayerChatBubble(JackID,"Ok!",white, 100.0, 5000); SetTimerEx("GetJackToFolow",100,1,"i",playerid); ApplyAnimation(JackID,"PED","WALK_PLAYER",4.1,1,1,1,1,0); return 1; } } return 1;}forward GetJackToFolow(playerid);public GetJackToFolow(playerid){ new JackID = GetPlayerID("Jack"); SetPlayerFacingPlayer(JackID, playerid);} Link to comment Share on other sites More sharing options...
mura Posted May 8, 2011 Author Report Share Posted May 8, 2011 chear nimeni? Link to comment Share on other sites More sharing options...
SteveX Posted May 8, 2011 Report Share Posted May 8, 2011 Nu se cer scripturi . Link to comment Share on other sites More sharing options...
mura Posted May 8, 2011 Author Report Share Posted May 8, 2011 Nu se cer scripturi .Multumesc pentru nimic, am si asteptat toata ziua un raspuns Link to comment Share on other sites More sharing options...
IstuntmanI Posted May 8, 2011 Report Share Posted May 8, 2011 Multumesc pentru nimic, am si asteptat toata ziua un raspunsCu placere, dar regulile sunt reguli. Link to comment Share on other sites More sharing options...
Question
mura
Imi puteti da va rog frumos un script in pawno pentru ca npc-ul sa te urmeze?Am gasit ceva dar nu cred ca e bun:
public OnPlayerText(playerid, text[])
{
new JackID = GetPlayerID("Jack");
new Float:x,Float:y,Float:z;
GetPlayerPos(JackID,x,y,z);
if(IsPlayerFacingPlayer(playerid,JackID,10.0))
{
if(strfind(text, "Follow me") != -1 && IsPlayerInRangeOfPoint(playerid,5.0,x,y,z))
{
SetPlayerChatBubble(JackID,"Ok!",white, 100.0, 5000);
SetTimerEx("GetJackToFolow",100,1,"i",playerid);
ApplyAnimation(JackID,"PED","WALK_PLAYER",4.1,1,1,1,1,0);
return 1;
}
}
return 1;
}
forward GetJackToFolow(playerid);
public GetJackToFolow(playerid)
{
new JackID = GetPlayerID("Jack");
SetPlayerFacingPlayer(JackID, playerid);
}
Link to comment
Share on other sites
4 answers to this question
Recommended Posts