CheckPoints
#1

i want to create multiple checkpoints
how to do that?
please somebody help me
Reply
#2

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...
Reply
#3

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
Reply
#4

you edited the post , your first one was about is it possible to make the commands function in dialog response in a short way..
Reply
#5

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
Reply
#6

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

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
Reply
#8

dude your_X have to be changed and your_y have to be changed and your_z have to be changed too.
Reply
#9

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.
Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)