CheckPoint and Sphere

Started by [VSS]Shawn, Jun 20, 2015, 11:18 PM

Previous topic - Next topic

gamingpro

incorrect its must be
CreateCheckpoint(player, ID, Showing(true or false), Vector(PosX, PosY, PosZ), ARGB(Alpha, Red, Green, Blue), Size);
The result is:
CreateCheckpoint(null, 0, true, Vector(-902.341,-345.601,13.3802), ARGB(355, 255, 0, 0), 2);

gamingpro

Quote from: gamingpro on Jun 18, 2023, 02:27 PMincorrect its must be
CreateCheckpoint(player, ID, Showing(true or false), Vector(PosX, PosY, PosZ), ARGB(Alpha, Red, Green, Blue), Size);
The result is:
CreateCheckpoint(null, 0, true, Vector(-902.341,-345.601,13.3802), ARGB(355, 255, 0, 0), 2);

PSL

You need to create a slot first, which is a checkpoint.
function onScriptLoad()
{
bankcp<-CreateCheckpoint(。。。。);
}

When a player enters a checkpoint, if the checkpoint ID is the same as the slot ID
function onCheckpointEntered(player,checkpoint)
{
if(checkpoint.ID==bankcp.ID)
{
player.Frozen=true;
MessagePlayer("In 10 seconds, you'll have $1,000 in cash",player);
NewTimer("UnFrozen",10000,1,player.ID);
}
}

//Add this unfrozen function anywhere,Unfreeze the player and get 1000 cash
function UnFrozen(i)
{
local plr=FindPlayer(I);
if(plr)
{
plr.Frozen=false;
plr.Cash+=1000;

//Delete this bank checkpoint
bankcp.Remove();
bankcp=null;
NewTimer("BacnkCpCreate",60000,1);  //Set timer and re-create in 60 seconds
}
}

function BacnkCpCreate()
{
bankcp=CreateCheckpoint(。。。。);
}

Hope this was helpful, sorry I didn't test this code.