[Plugin] Streamer Plugin

I have this:

pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid);
{
    if(checkpointid = LSPDGarage)
    {
        SetPlayerInt(playerid, 3);
        SetPlayerPos(playerid, 1480.9470,-1767.6609,18.7958);
    }
    return 1;
}
But it doesn't work,
pawn Код:
if(checkpointid...)
is the problem of course... How would I do this?
Reply

pawn Код:
if(checkpointid == LSPDGarage)
Reply

Quote:
Originally Posted by llama
pawn Код:
if(checkpointid == LSPDGarage)
Okay, I did that. Now I have:

pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid);
{
    if(checkpointid == LSPDGarage)
    {
        SetPlayerInt(playerid, 3);
        SetPlayerPos(playerid, 1480.9470,-1767.6609,18.7958);
    }
    return 1;
}
But I have these errors:

Код:
C:\CnR SA-MP Server\gamemodes\CnR.pwn(294) : error 055: start of function body without function header
C:\CnR SA-MP Server\gamemodes\CnR.pwn(295) : error 010: invalid function or declaration
C:\CnR SA-MP Server\gamemodes\CnR.pwn(298) : error 021: symbol already defined: "SetPlayerPos"
C:\CnR SA-MP Server\gamemodes\CnR.pwn(300) : error 010: invalid function or declaration
C:\CnR SA-MP Server\gamemodes\CnR.pwn(54) : warning 204: symbol is assigned a value that is never used: "LSPDGarage"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Line 294 is the {

I also have this included in my GM:

pawn Код:
LSPDGarage = CreateDynamicCP(1525.3311,-1677.8967,5.8906,2,-1,-1,-1,100);
new LSPDGarage;
#include <streamer>
What could be the issue?
Reply

Instead of
pawn Код:
LSPDGarage = CreateDynamicCP(1525.3311,-1677.8967,5.8906,2,-1,-1,-1,100);
new LSPDGarage;
#include <streamer>
Do it in this order:
pawn Код:
#include <streamer>
new LSPDGarage;
LSPDGarage = CreateDynamicCP(1525.3311,-1677.8967,5.8906,2,-1,-1,-1,100);
in fact you can just do this
pawn Код:
#include <streamer>
new LSPDGarage = CreateDynamicCP(1525.3311,-1677.8967,5.8906,2,-1,-1,-1,100);
Then this:
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid);
{
    if(checkpointid = LSPDGarage)
    {
        SetPlayerInt(playerid, 3);
        SetPlayerPos(playerid, 1480.9470,-1767.6609,18.7958);
    }
    return 1;
}
Change to:
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid) //there should be no ; at the end, this is a callback
{
    if(checkpointid = LSPDGarage)
    {
        SetPlayerInt(playerid, 3);
        SetPlayerPos(playerid, 1480.9470,-1767.6609,18.7958);
    }
    return 1;
}
See if that works.

Reply

pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid) //there should be no ; at the end, this is a callback
{
    if(checkpointid == LSPDGarage) // Not =
    {
        SetPlayerInt(playerid, 3);
        SetPlayerPos(playerid, 1480.9470,-1767.6609,18.7958);
    }
    return 1;
}
Reply

Idea:
Код:
AttachElementToPlayer(playerid, type, ID);
AttachElementToVehicle(vehicleid, type, ID);
EDIT:
Код:
Streamer_SetIntData(STREAMER_TYPE_MAP_ICON, IconID, E_STREAMER_COLOR, 0x1F961CFF);
Doesn't work The color doesn't change, but setting position works.
Reply

Quote:
Originally Posted by ziomal432
Idea:
Код:
AttachElementToPlayer(playerid, type, ID);
AttachElementToVehicle(vehicleid, type, ID);
EDIT:
Код:
Streamer_SetIntData(STREAMER_TYPE_MAP_ICON, IconID, E_STREAMER_COLOR, 0x1F961CFF);
Doesn't work The color doesn't change, but setting position works.
Quote:

color The color of the icon, this should only be used with the square icon (ID: 1).

https://sampwiki.blast.hk/wiki/SetPlayerMapIcon
Reply

I use Icon Streamer included in this plugin. I don't want to use SetPlayerMapIcon
Reply

Quote:
Originally Posted by ziomal432
I use Icon Streamer included in this plugin. I don't want to use SetPlayerMapIcon
FAIL... I pasted the link from where I copied the quote for you, okay?
Reply

Alright, epic fail, but

"Note: If you use an invalid icon ID, it will create ID 1 (White Square)"

Anyway, this white square looks ugly, looks like I'll do this otherwise (blinking).
Reply

Quote:
Originally Posted by DavidC
Instead of
pawn Код:
LSPDGarage = CreateDynamicCP(1525.3311,-1677.8967,5.8906,2,-1,-1,-1,100);
new LSPDGarage;
#include <streamer>
Do it in this order:
pawn Код:
#include <streamer>
new LSPDGarage;
LSPDGarage = CreateDynamicCP(1525.3311,-1677.8967,5.8906,2,-1,-1,-1,100);
in fact you can just do this
pawn Код:
#include <streamer>
new LSPDGarage = CreateDynamicCP(1525.3311,-1677.8967,5.8906,2,-1,-1,-1,100);
Then this:
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid);
{
    if(checkpointid = LSPDGarage)
    {
        SetPlayerInt(playerid, 3);
        SetPlayerPos(playerid, 1480.9470,-1767.6609,18.7958);
    }
    return 1;
}
Change to:
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid) //there should be no ; at the end, this is a callback
{
    if(checkpointid = LSPDGarage)
    {
        SetPlayerInt(playerid, 3);
        SetPlayerPos(playerid, 1480.9470,-1767.6609,18.7958);
    }
    return 1;
}
See if that works.
Wow, another dumb mistake. Thanks! It works good now.
Reply

Код:
Streamer_SetIntData(STREAMER_TYPE_MAP_ICON, IconID, E_STREAMER_WORLD_ID, 97531);
Quote:

[16:12:56] *** Streamer_SetIntData: Invalid ID specified

Some ideas?
Reply

What was value of IconID?
Reply

EDIT:
Another code has set the value to -2. Now works good.
Reply

Incognito dont update this plugin ?

Sorry, i'm bad english.
Reply

Quote:
Originally Posted by kurta999
Incognito dont update this plugin ?

Sorry, i'm bad english.
Why should be update this?
Reply

Is OnPlayerEnterCheckpoint used in this plugin? OnPlayerEnterDynamicCP is called like 1 second after I enter checkpoints, which isn't really ideal.
Reply

Quote:
Originally Posted by Mikep.
Is OnPlayerEnterCheckpoint used in this plugin? OnPlayerEnterDynamicCP is called like 1 second after I enter checkpoints, which isn't really ideal.
Yeah, I don't think that is a good feature, but I guess some people like it.
Reply

Quote:
Originally Posted by Mikep.
Is OnPlayerEnterCheckpoint used in this plugin? OnPlayerEnterDynamicCP is called like 1 second after I enter checkpoints, which isn't really ideal.
Perhaps it's called so late because you've setted Streamer_TickRate(rate); too high.
Reply

Quote:
Originally Posted by Sma_X
Quote:
Originally Posted by Mikep.
Is OnPlayerEnterCheckpoint used in this plugin? OnPlayerEnterDynamicCP is called like 1 second after I enter checkpoints, which isn't really ideal.
Perhaps it's called so late because you've setted Streamer_TickRate(rate); too high.
That has nothing to do with OnPlayerEnterCheckpoint. It's quicker to use OnPlayerEnterCheckpoint rather than distance checks..
Reply


Forum Jump:


Users browsing this thread: 41 Guest(s)