SA-MP Forums Archive
CreateDynamicCP Nothing shows - 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: CreateDynamicCP Nothing shows (/showthread.php?tid=502870)



CreateDynamicCP Nothing shows - MikeMike1997 - 26.03.2014

When I go into the checkpoint nothing shows up?

Код:
public OnPlayerSpawn(playerid)
{
	//CHECKPOINTS
    Checkpoint[0] = CreateDynamicCP(207.7453,-101.0984,1005.2578, 2, -1, -1, -1, 50);
    Checkpoint[1] = CreateDynamicCP(1477.4838,2806.2371,10.7708, 2, -1, -1, -1, 50);
    //END OF CHECKPOINTS
}
return 1;
}
Код:
// CHECKPOINTS
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    if(checkpointid == Checkpoint[0])
    {
	ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Choose a car", "Caddy ($7,000) \nQuad ($10,000) \nMower ($2,000)", "Buy", "Cancel");
	}
}
//END OF CHECKPOINTS



Re: CreateDynamicCP Nothing shows - Schocc - 26.03.2014

The latest version follows this syntax.
pawn Код:
native CreateDynamicCP(Float:x, Float:y, Float:z, Float:size, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 100.0);
Also try to leave larger than 2.0, the 'size' parameter


Re: CreateDynamicCP Nothing shows - MikeMike1997 - 26.03.2014

But I am following that Syntax?


Re: CreateDynamicCP Nothing shows - Schocc - 26.03.2014

Quote:
Originally Posted by MikeMike1997
Посмотреть сообщение
But I am following that Syntax?
Negative, count parameters...


Re: CreateDynamicCP Nothing shows - Dignity - 26.03.2014

Quote:
Originally Posted by Schocc
Посмотреть сообщение
Negative, count parameters...
The native requires eight parameters. MikeMike1997's code has exactly eight parameters. If he messed those up, he would have gotten a tag mismatch warning.

Nevertheless, did you try using variables without brackets? See if those work. (i.e. instead of Checkpoint[i], use Checkpoint1, 2, etc)


Re: CreateDynamicCP Nothing shows - MikeMike1997 - 26.03.2014

How would I work that out? Since there is the params coming out after the Checkpoint?


Re: CreateDynamicCP Nothing shows - Dignity - 26.03.2014

What do you mean? Instead of using params (as you are; Checkpoint[0], etc), use Checkpoint0?


Re: CreateDynamicCP Nothing shows - Schocc - 26.03.2014

I tested here is working properly!


Re: CreateDynamicCP Nothing shows - MikeMike1997 - 26.03.2014

Schocc what INC is CreateDynamicCP under?


Re: CreateDynamicCP Nothing shows - Schocc - 26.03.2014

Quote:
Originally Posted by MikeMike1997
Посмотреть сообщение
Schocc what INC is CreateDynamicCP under?
Download plugin and inc.

link