Checkpoint visible to all players
#1

When I'm playing with friends, the only person that can use the checkpoint is player ID 0.
How can I make it to where all players can see and use checkpoints?

pawn Код:
new house;

public OnGameModeInit()
{
    house = CreateDynamicCP(-1968.6255,109.9457,27.6875,1,0,0,-1,3);
    return 1;
}

public OnPlayerEnterDynamicCP(playerid,checkpointid)
{
    if(checkpointid == house)
    {
        SendClientMessage(playerid,COLOR_RED,"Door step of house");
       
        new Float:x,Float:y,Float:z;
        GetPlayerPos(playerid,x,y,z);
        SetPlayerPos(playerid,365.7158,-9.8873,1001.8516);
        SetPlayerVirtualWorld(playerid,1);
        SetPlayerInterior(playerid,9);
    }
    return 1;
}
Reply
#2

nwm.
Reply
#3

use it like this.

pawn Код:
CreateDynamicCP(Float, Float:y, Float:z, Floatize, worldid = -1, interiorid = -1, playerid = -1, Floattreamdistance = 100.0);
Reply
#4

Quote:
Originally Posted by (*|Flake|*)
Посмотреть сообщение
use it like this.

pawn Код:
CreateDynamicCP(Float, Float:y, Float:z, Floatize, worldid = -1, interiorid = -1, playerid = -1, Floattreamdistance = 100.0);
Can you explain to me how that will help at all? I know how to use CreateDynamicCP.
Reply
#5

Replace player id as -1 instead of 0 in the createdynamiccp thing..
Reply
#6

He's not understanding it properly and seems to still be struggling so we might as well just give him the code.
pawn Код:
public OnGameModeInit()
{
    house = CreateDynamicCP(-1968.6255,109.9457,27.6875,2.0,-1, -1, ,-1, 5.0);
    return 1;
}
Reply
#7

Alright. If you view the [REL] Streamer thread, Incognito has said that:
If you replace any of the optional parameters, i.e. Virtual world, player id, world id, with -1, the checkpoint/object/pickup will be streamed across every such world, and for all players.
pawn Код:
CreateDynamicCP(-1968.6255,109.9457,27.6875,2.0,-1, -1, ,-1, 5.0);
//Since, virtual world, playerid, and world id are -1 here, it will be streamed across every virtual word, and for every player.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)