Checkpoint exist - 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: Checkpoint exist (
/showthread.php?tid=611667)
Checkpoint exist -
XStreeter - 09.07.2016
HELLO
EvacBusCheckpoint = CreateDynamicCP(Map[CPx],Map[CPy],Map[CPz],4.0, -1, -1, -1, 9999.9);
i want create an system if this checkpoint is not created then create it automaticly.
Thanks
I want know how to check if is created or is not created ?
Re: Checkpoint exist -
Maximun - 09.07.2016
Such this?
PHP код:
if(GetPVarInt(playerid, "BusCP") == 0)
{
EvacBusCheckpoint = CreateDynamicCP(Map[CPx],Map[CPy],Map[CPz],4.0, -1, -1, -1, 9999.9);
SetPVarInt(playerid, "BusCP", 1);
}
Re: Checkpoint exist -
XStreeter - 09.07.2016
PHP код:
function OnMapUpdate()
{
if(GameMinutes == 4 && GameSeconds == 45) for(new i=1;i<=MAX_VEHICLES;i++) DestroyVehicle(i);
if(GameMinutes == 1 && GameSeconds == 1)
{
HumanEvacOpened = 1;
MoveDynamicObject(gateobj,Map[GateX],Map[GateY],Map[MoveGate],3.0);
foreach(Player,i)
EvacBusCheckpoint = CreateDynamicCP(Map[CPx],Map[CPy],Map[CPz],4.0, -1, -1, -1, 9999.9);
CreateEvacMaps();
}
foreach(Player,i)
{
if(ZombieMode[i] == 1)
{
if(GameMinutes <= 0 && GameSeconds <= 59)
{
new string[125];
format(string,sizeof(string),"~b~humans ~w~evac bus arrived!");
TextDrawSetString(HumanEvac[i],string);
TextDrawShowForPlayer(i, HumanEvac[i]);
}
}
if(GameMinutes <= 0 && GameSeconds <= 0)
{
KillTimer(mapvar);
KillTimer(balvar);
KillTimer(tmEndMap);
tmEndMap = SetTimer("EndMap",2000,false);
}
}
return 1;
}
i have this here
But sometimes it dont show me checkpoint. everythink else get showed but checkpoint dont get showed
please maximum give me an answer