Help me with creating pickups - 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: Help me with creating pickups (
/showthread.php?tid=509875)
Help me with creating pickups -
saikumar - 28.04.2014
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!!!
Re: Help me with creating pickups -
Crypto20 - 28.04.2014
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;
}
Re: Help me with creating pickups -
saikumar - 28.04.2014
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);
Re: Help me with creating pickups -
Brandon_More - 28.04.2014
Quote:
Originally Posted by saikumar
and what is the use of DisablePlayerCheckpoint(playerid); ![Huh?](images/smilies/confused.gif)
|
https://sampwiki.blast.hk/wiki/DisablePlayerCheckpoint
Re: Help me with creating pickups -
saikumar - 28.04.2014
Quote:
Originally Posted by Brandon_More
|
can anybody give me a clear explanation ??
AW: Help me with creating pickups -
Macronix - 28.04.2014
DisablePlayerCheckpoint would just destroy the checkpoint you entered
Re: AW: Help me with creating pickups -
saikumar - 28.04.2014
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)
?
Re: Help me with creating pickups -
saikumar - 28.04.2014
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?
Re: Help me with creating pickups -
Konstantinos - 28.04.2014
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);
Re: Help me with creating pickups -
saikumar - 28.04.2014
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