01.04.2013, 16:52
Quote:
@UP
Code:
#include <a_samp> #include <PathFinder> #include <rnpc> public OnPathCalculated(routeid,success,nodes[],nodes_size) { if(success) { new Float:x,Float:y,Float:z,Float:x1,Float:y1,Float:z1; RNPC_CreateBuild(routeid,PLAYER_RECORDING_TYPE_ONFOOT); //Bot! for(new i; i < nodes_size-1; i++) { PathFinder_GetNodePos(nodes[i],x,y,z); PathFinder_GetNodePos(nodes[i+1],x1,y1,z1); RNPC_AddMovement(x,y,z+1,x1,y1,z1+1,RNPC_SPEED_RUN); //crappy :D } RNPC_FinishBuild(); RNPC_StartBuildPlayback(routeid); } else { new text[50]; format(text,sizeof(text),"Zombie: %d failed!",routeid); SendClientMessageToAll(-1,text); } return 1; } public OnFilterScriptInit() { PathFinder_Init(1.0); //test ConnectRNPC("Bot"); //id 0 return 1; } public OnPlayerCommandText(playerid,cmdtext[]) { if(!strcmp("/bot_test",cmdtext,true)) { new Float:x,Float:y,Float:z; GetPlayerPos(playerid,x,y,z); PathFinder_FindWay(0,x,y,x+random(100)-50,y+random(100)-50); return 1; } return 0; } |
I have your version 0.12.. what now ?