need help for this Public thing
#1

Hello dear Helpers i will explain my problem

i want To make when npc be in x,y,z he move to an other Point thats what i have made

Код:
public FCNPC_OnCreate(npcid)
{
    if(FCNPC_GetPosition(Cholo, 145.1412,-67.6555,1.4297)
    {
    	FCNPC_GoTo(Cholo, 145.1412,-67.6555,1.4297, MOVE_TYPE_WALK, 1, 0);
    }
    return 1;
}
My Error when i compile
Код:
Error : : error 035: argument type mismatch (argument 2
Reply
#2

On what line is the error?
Reply
#3

if(FCNPC_GetPosition(Cholo, 145.1412,-67.6555,1.4297) on this
Reply
#4

Quote:

FCNPC_GoTo

Quote:

Parameters:
ID: the NPC ID
X: the X coordinate to go to
Y: the Y coordinate to go to
Z: the Z coordinate to go to
type: mouvement type
MOVE_TYPE_WALK: Walk the NPC
MOVE_TYPE_RUN: Run the NPC
MOVE_TYPE_SPRINT: Sprint the NPC
MOVE_TYPE_DRIVE: Drive the NPC (only in car)
Speed: Driving speed (applies only when driving)
UseZMap: Flag to indicate the ZMap usage
Return: None

So try without the speed:
Quote:

FCNPC_GoTo(Cholo, 145.1412,-67.6555,1.4297, MOVE_TYPE_WALK, 0);

Reply
#5

there are no problem with FCNPC_GoTo(Cholo, 145.1412,-67.6555,1.4297, MOVE_TYPE_WALK, 0);

the probleme is on this if(FCNPC_GetPosition(Cholo, 145.1412,-67.6555,1.4297) on this
Reply
#6

Are you not supposed to do like this:

pawn Код:
new float:x, float:y, float:z;
FCNPC_GetPosition(Cholo, x, y, z);
And then:

pawn Код:
if(x == 145.1412 && y == -67.6555 && z == 1.4297){
...
}
Reply
#7

what i want to do is when the npc be in x,y,z he go To an other x,y,z Cholo = the name of npc
Reply
#8

Have you tried this:

pawn Код:
new Float:x, Float:y, Float:z;
FCNPC_GetPosition(Cholo, x, y, z);

if(x == 145.1412 && y == -67.6555 && z == 1.4297){
FCNPC_GoTo(Cholo, 145.1412,-67.6555,1.4297, MOVE_TYPE_WALK, 0);
}
Reply
#9

No much Warrnings its not like that It should as i have told you
Reply
#10

Fixed Solved
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)