SA-MP Forums Archive
need help for this Public thing - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: need help for this Public thing (/showthread.php?tid=470489)



need help for this Public thing - BigBaws - 18.10.2013

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



Re: need help for this Public thing - Chrillzen - 18.10.2013

On what line is the error?


Re : need help for this Public thing - BigBaws - 18.10.2013

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


Re: need help for this Public thing - AlonzoTorres - 18.10.2013

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);




Re : need help for this Public thing - BigBaws - 18.10.2013

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


Re: need help for this Public thing - AlonzoTorres - 18.10.2013

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){
...
}



Re : need help for this Public thing - BigBaws - 18.10.2013

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


Re: need help for this Public thing - AlonzoTorres - 18.10.2013

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);
}



Re : need help for this Public thing - BigBaws - 18.10.2013

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


Re : need help for this Public thing - BigBaws - 18.10.2013

Fixed Solved