SA-MP Forums Archive
how to set checkpoint to everyone? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: how to set checkpoint to everyone? (/showthread.php?tid=112999)



how to set checkpoint to everyone? - WardenCS - 11.12.2009

how can i set checkpoint to everyone in the server who comes online?


Re: how to set checkpoint to everyone? - DeathOnaStick - 11.12.2009

OnPlayerConnect
pawn Код:
SetPlayerCheckpoint(playerid,Float:x,Float:y,Float:z,Float:size);
Wasn't that hard, was it?!


Re: how to set checkpoint to everyone? - WardenCS - 11.12.2009

i have it with timer...


Re: how to set checkpoint to everyone? - DeathOnaStick - 11.12.2009

Quote:
Originally Posted by ZzZzZ
i have it with timer...
You have what on a timer? The checkpoint?

pawn Код:
for(new i=0; i<=MAX_PLAYERS; i++)SetPlayerCheckpoint(i,Float:x,Float:y,Float:z,Float:size);
Use this if you want to make it visible for every player.

Over script:
pawn Код:
new bool:CheckpointActive=false;
In timer:
pawn Код:
CheckpointActive=true;
OnPlayerConnect:
pawn Код:
if(CheckpointActive==true)SetPlayerCheckpoint(i,Float:x,Float:y,Float:z,Float:size);
When destroying the Checkpoint:
pawn Код:
CheckpointActive=false;
Cheerz


Re: how to set checkpoint to everyone? - dice7 - 11.12.2009

pawn Код:
public OnPlayerConnect(playerid)
{
  SetTimerEx("SetCP", 1000, false, "d", playerid);
}

forward SetCP(playerid);
public SetCP(playerid)
{
  SetPlayerCheckpoint(playerid,Float:x,Float:y,Float:z,Float:size);
}



Re: how to set checkpoint to everyone? - WardenCS - 11.12.2009

but i want like...it would be at same time to everyone,not then when player logs in,or that works like that?


Re: how to set checkpoint to everyone? - dice7 - 11.12.2009

Then make it into a cmd or something


Re: how to set checkpoint to everyone? - WardenCS - 11.12.2009

whatca mean?