CheckPoints -
saikumar - 29.04.2014
i want to create multiple checkpoints
how to do that?
please somebody help me
Re: Commands in Dialog-List -
Eth - 29.04.2014
then you should use onplayer enter dynamic cp:
there check this out
https://sampforum.blast.hk/showthread.php?tid=102865. hope that I helped you...
Re: Commands in Dialog-List -
saikumar - 29.04.2014
Quote:
Originally Posted by Eth
no not really, i wanted to do that too but couldn't find any way..
|
it is possible...
i seen in a lot of servers
Re: CheckPoints -
Eth - 29.04.2014
you edited the post , your first one was about is it possible to make the commands function in dialog response in a short way..
Re: CheckPoints -
saikumar - 29.04.2014
Quote:
Originally Posted by Eth
you edited the post , your first one was about is it possible to make the commands function in dialog response in a short way..
|
Yes i edited coz i posted wrong question and it is possible by
return cmd_yourcmd(playerid, "");
______________
anyhow do u know how to create checkpoints not one...a lot :9
Re: CheckPoints -
Eth - 29.04.2014
Quote:
Originally Posted by saikumar
Yes i edited coz i posted wrong question and it is possible by
return cmd_yourcmd(playerid, "");
______________
anyhow do u know how to create checkpoints not one...a lot :9
|
yes sir first of all you should download this inc:
https://sampforum.blast.hk/showthread.php?tid=102865
second type in gamemodeinit:CreateDynamicCP(x,y,z,sizeofcp,worldi d(always -1),interiorid,playerid,distance);
Re: CheckPoints -
saikumar - 29.04.2014
pawn Код:
new telecp_1;
new telecp_2;
public OnGameModeInit()
telecp_1 = CreateDynamicCP(YOUR_X, YOUR_Y, YOUR_Z, 1.5, -1, -1, -1, 150.0);
telecp_2 = CreateDynamicCP(YOUR_X, YOUR_Y, YOUR_Z, 3.0, -1, 5, -1, 300.0);
public OnPlayerEnterCheckpoint(playerid, checkpointid)
{
if(checkpointid == lobbyexit)
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, -527.7829,2312.0740,50.1866);
}
return 1;
}
i did that but i am getting this error:
error 025: function heading differs from prototype
what is the problem
Re: CheckPoints -
Eth - 29.04.2014
dude your_X have to be changed and your_y have to be changed and your_z have to be changed too.
Re: CheckPoints -
Konstantinos - 29.04.2014
Change to:
pawn Код:
OnPlayerEnterDynamicCP(playerid, checkpointid)
as streamer uses its own callback and not the default one (which is without
checkpointid parameter).
It won't be compiled because the x and y are not defined or you didn't replace them with some coordinates as Eth mentioned.
Also you check if the checkpoint is
lobbyexit, but you have only declared and assigned to
telecp_1 and
telecp_2.
And last, use brackets for the OnGameModeInit callback.
Re: CheckPoints -
saikumar - 29.04.2014
Quote:
Originally Posted by saikumar
pawn Код:
new telecp_1; new telecp_2;
public OnGameModeInit() telecp_1 = CreateDynamicCP(YOUR_X, YOUR_Y, YOUR_Z, 1.5, -1, -1, -1, 150.0); telecp_2 = CreateDynamicCP(YOUR_X, YOUR_Y, YOUR_Z, 3.0, -1, 5, -1, 300.0);
public OnPlayerEnterCheckpoint(playerid, checkpointid) { if(checkpointid == lobbyexit) { SetPlayerInterior(playerid, 0); SetPlayerPos(playerid, -527.7829,2312.0740,50.1866); } return 1; }
|
this is not how exactly i made in script i just showed example
and thanks for info @Konstantinos
i used this:
public OnPlayerEnterCheckpoint(playerid, checkpointid)
instead of this:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
anyway thanks for help