Posts: 186
Threads: 41
Joined: Aug 2013
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!!!
Posts: 186
Threads: 41
Joined: Aug 2013
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);
Posts: 186
Threads: 41
Joined: Aug 2013
Quote:
Originally Posted by Brandon_More
|
can anybody give me a clear explanation ??
Posts: 186
Threads: 41
Joined: Aug 2013
Quote:
Originally Posted by Macronix
DisablePlayerCheckpoint would just destroy the checkpoint you entered ![Wink](images/smilies/wink.png)
|
destroy temp or permanently
![Huh?](images/smilies/confused.gif)
?
Posts: 186
Threads: 41
Joined: Aug 2013
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?
Posts: 186
Threads: 41
Joined: Aug 2013
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
![Sad](images/smilies/sad.gif)
please