SA-MP Forums Archive
[Plugin] Streamer Plugin - 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: Plugin Development (https://sampforum.blast.hk/forumdisplay.php?fid=18)
+--- Thread: [Plugin] Streamer Plugin (/showthread.php?tid=102865)



Re: [REL] Streamer Plugin v2.3.7 - Scenario - 16.04.2010

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?


Re: [REL] Streamer Plugin v2.3.7 - llama - 16.04.2010

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



Re: [REL] Streamer Plugin v2.3.7 - Scenario - 16.04.2010

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?


Re: [REL] Streamer Plugin v2.3.7 - pyrodave - 16.04.2010

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.




Re: [REL] Streamer Plugin v2.3.7 - -Davee- - 16.04.2010

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;
}



Re: [REL] Streamer Plugin v2.3.7 - ziomal432 - 16.04.2010

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.


Re: [REL] Streamer Plugin v2.3.7 - -Davee- - 16.04.2010

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


Re: [REL] Streamer Plugin v2.3.7 - ziomal432 - 16.04.2010

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


Re: [REL] Streamer Plugin v2.3.7 - -Davee- - 16.04.2010

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?


Re: [REL] Streamer Plugin v2.3.7 - ziomal432 - 16.04.2010

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).


Re: [REL] Streamer Plugin v2.3.7 - Scenario - 16.04.2010

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.


Re: [REL] Streamer Plugin v2.3.7 - ziomal432 - 17.04.2010

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

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

Some ideas?


Re: [REL] Streamer Plugin v2.3.7 - Sergei - 17.04.2010

What was value of IconID?


Re: [REL] Streamer Plugin v2.3.7 - ziomal432 - 17.04.2010

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


Re: [REL] Streamer Plugin v2.3.7 - kurta999 - 17.04.2010

Incognito dont update this plugin ?

Sorry, i'm bad english.


Re: [REL] Streamer Plugin v2.3.7 - -Davee- - 17.04.2010

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

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


Re: [REL] Streamer Plugin v2.3.7 - Mikep. - 18.04.2010

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


Re: [REL] Streamer Plugin v2.3.7 - Scenario - 19.04.2010

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.


Re: [REL] Streamer Plugin v2.3.7 - xxmitsu - 19.04.2010

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.


Re: [REL] Streamer Plugin v2.3.7 - Mikep. - 19.04.2010

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..