15.02.2013, 12:06
I'am quite new to the RNPC include & plugin. I made a /attack command:
BUT, when I type this command the console crashes and closes and I get this error:
Any suggestions on how to fix?
pawn Код:
CMD:attack(playerid,params[]) {
RNPC_CreateBuild(npc[0], 0);
RNPC_CreateBuild(npc[1], 0);
RNPC_CreateBuild(npc[2], 0);
RNPC_CreateBuild(npc[3], 0);
RNPC_CreateBuild(npc[4], 0);
FollowPlayer(npc[0],playerid);
FollowPlayer(npc[1],playerid);
FollowPlayer(npc[2],playerid);
FollowPlayer(npc[3],playerid);
FollowPlayer(npc[4],playerid);
SetPlayerPos(npc[0], 0,0,1);
SetPlayerPos(npc[1], 0,0,1);
SetPlayerPos(npc[2], 0,0,1);
SetPlayerPos(npc[3], 0,0,1);
SetPlayerPos(npc[4], 0,0,1);
RNPC_SetWeaponID(23);
RNPC_AddPause(500);
RNPC_AddMovement(0,0,1, 20.0, 20.0, 0.0);
RNPC_ConcatMovement(0, 20.0, 0);
RNPC_AddPause(200);
RNPC_SetKeys(128);
RNPC_AddPause(500);
RNPC_SetKeys(128 + 4);
RNPC_AddPause(500);
for (new i = 0; i < 360; i+=20) {
RNPC_SetAngleQuats(0.0, i, 0.0);
RNPC_AddPause(150);
}
RNPC_SetKeys(128);
RNPC_AddPause(500);
RNPC_SetKeys(0);
RNPC_FinishBuild();
SendClientMessage(playerid, RED, "NPC is on it's way!");
RNPC_StartBuildPlayback(npc[0]);
RNPC_StartBuildPlayback(npc[1]);
RNPC_StartBuildPlayback(npc[2]);
RNPC_StartBuildPlayback(npc[3]);
RNPC_StartBuildPlayback(npc[4]);
return 1;
}
Any suggestions on how to fix?