Help me with creating pickups
#1

hiii guys,
i want to create a pickup i.e Red mark like in SP used for missions.
and if the player enters into that red mark he should be teleported to an interior that i want.
can guys help me by explaining how to do that

thanks in Advance!!!
Reply
#2

You would use this https://sampwiki.blast.hk/wiki/OnPlayerEnterCheckpoint
for example of use:
Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerCheckpoint(playerid, 1982.6150, -220.6680, -0.2432, 3.0);
    return 1;
}
 
public OnPlayerEnterCheckpoint(playerid)
{
    SetPlayerPos(playerid,1982.6150, -220.6680, -0.2432);//change pos to what ever your interior position
    SetPlayerVirtualWorld(playerid, 69);// You would change the virtual world to your interior vw.
    DisablePlayerCheckpoint(playerid);
    return 1;
}
Reply
#3

Quote:
Originally Posted by Crypto20
Посмотреть сообщение
You would use this https://sampwiki.blast.hk/wiki/OnPlayerEnterCheckpoint
for example of use:
Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerCheckpoint(playerid, 1982.6150, -220.6680, -0.2432, 3.0);
    return 1;
}
 
public OnPlayerEnterCheckpoint(playerid)
{
    SetPlayerPos(playerid,1982.6150, -220.6680, -0.2432);//change pos to what ever your interior position
    SetPlayerVirtualWorld(playerid, 69);// You would change the virtual world to your interior vw.
    DisablePlayerCheckpoint(playerid);
    return 1;
}
and what is the use of DisablePlayerCheckpoint(playerid);
Reply
#4

Quote:
Originally Posted by saikumar
Посмотреть сообщение
and what is the use of DisablePlayerCheckpoint(playerid);
https://sampwiki.blast.hk/wiki/DisablePlayerCheckpoint
Reply
#5

Quote:
Originally Posted by Brandon_More
Посмотреть сообщение
can anybody give me a clear explanation ??
Reply
#6

DisablePlayerCheckpoint would just destroy the checkpoint you entered
Reply
#7

Quote:
Originally Posted by Macronix
Посмотреть сообщение
DisablePlayerCheckpoint would just destroy the checkpoint you entered
destroy temp or permanently?
Reply
#8

Quote:
Originally Posted by Crypto20
Посмотреть сообщение
You would use this https://sampwiki.blast.hk/wiki/OnPlayerEnterCheckpoint
for example of use:
Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerCheckpoint(playerid, 1982.6150, -220.6680, -0.2432, 3.0);
    return 1;
}
 
public OnPlayerEnterCheckpoint(playerid)
{
    SetPlayerPos(playerid,1982.6150, -220.6680, -0.2432);//change pos to what ever your interior position
    SetPlayerVirtualWorld(playerid, 69);// You would change the virtual world to your interior vw.
    DisablePlayerCheckpoint(playerid);
    return 1;
}
sorry for double post.

i want create several checkpoints not only one...
how to do that with this script?
Reply
#9

By using a streamer: https://sampforum.blast.hk/showthread.php?tid=102865

pawn Код:
// functions:
native CreateDynamicCP(Float:x, Float:y, Float:z, Float:size, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 100.0);
native DestroyDynamicCP(checkpointid);
native IsValidDynamicCP(checkpointid);
native TogglePlayerDynamicCP(playerid, checkpointid, toggle);
native TogglePlayerAllDynamicCPs(playerid, toggle);
native IsPlayerInDynamicCP(playerid, checkpointid);
native GetPlayerVisibleDynamicCP(playerid);
and
pawn Код:
// callbacks:
forward OnPlayerEnterDynamicCP(playerid, checkpointid);
forward OnPlayerLeaveDynamicCP(playerid, checkpointid);
Reply
#10

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
By using a streamer: https://sampforum.blast.hk/showthread.php?tid=102865

pawn Код:
// functions:
native CreateDynamicCP(Float:x, Float:y, Float:z, Float:size, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 100.0);
native DestroyDynamicCP(checkpointid);
native IsValidDynamicCP(checkpointid);
native TogglePlayerDynamicCP(playerid, checkpointid, toggle);
native TogglePlayerAllDynamicCPs(playerid, toggle);
native IsPlayerInDynamicCP(playerid, checkpointid);
native GetPlayerVisibleDynamicCP(playerid);
and
pawn Код:
// callbacks:
forward OnPlayerEnterDynamicCP(playerid, checkpointid);
forward OnPlayerLeaveDynamicCP(playerid, checkpointid);
can u please show me a clear example with
creating a dynamic CP for teleports please
im a noob scripter
please
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)