[Plugin] Streamer Plugin

A suggestion:
pawn Код:
native GetRandomPosInDynamicArea( areaid, &Float:X, &Float:Y, &Float:Z );

// returns X, Y, Z
// Z should be 0.0 in a basic-shaped area (circle, rectangle)
2.7 is pretty great, thanks !
Reply

Why objects just appear when the player spawns?
Reply

Can anyone help me with the errors i'm getting here?

Код:
C:\Users\Will\Desktop\samp03x_svr_R2_win32\pawno\include\streamer.inc(155) : error 017: undefined symbol "OBJECT_MATERIAL_SIZE_256x128"
C:\Users\Will\Desktop\samp03x_svr_R2_win32\pawno\include\streamer.inc(236) : error 017: undefined symbol "MAPICON_LOCAL"
C:\Users\Will\Desktop\samp03x_svr_R2_win32\pawno\include\streamer.inc(313) : warning 235: public function lacks forward declaration (symbol "OnPlayerEditObject")
C:\Users\Will\Desktop\samp03x_svr_R2_win32\pawno\include\streamer.inc(336) : warning 235: public function lacks forward declaration (symbol "OnPlayerSelectObject")
C:\Users\Will\Desktop\samp03x_svr_R2_win32\pawno\include\streamer.inc(338) : error 017: undefined symbol "SELECT_OBJECT_PLAYER_OBJECT"
C:\Users\Will\Desktop\samp03x_svr_R2_win32\gamemodes\VortexRoleplay.pwn(9202) : error 017: undefined symbol "RemoveBuildingForPlayer"
C:\Users\Will\Desktop\samp03x_svr_R2_win32\gamemodes\VortexRoleplay.pwn(9203) : error 017: undefined symbol "RemoveBuildingForPlayer"
C:\Users\Will\Desktop\samp03x_svr_R2_win32\gamemodes\VortexRoleplay.pwn(9206) : error 017: undefined symbol "RemoveBuildingForPlayer"
C:\Users\Will\Desktop\samp03x_svr_R2_win32\gamemodes\VortexRoleplay.pwn(9207) : error 017: undefined symbol "RemoveBuildingForPlayer"
C:\Users\Will\Desktop\samp03x_svr_R2_win32\gamemodes\VortexRoleplay.pwn(9210) : error 017: undefined symbol "RemoveBuildingForPlayer"
C:\Users\Will\Desktop\samp03x_svr_R2_win32\gamemodes\VortexRoleplay.pwn(9211) : error 017: undefined symbol "RemoveBuildingForPlayer"
C:\Users\Will\Desktop\samp03x_svr_R2_win32\gamemodes\VortexRoleplay.pwn(9212) : error 017: undefined symbol "RemoveBuildingForPlayer"
C:\Users\Will\Desktop\samp03x_svr_R2_win32\gamemodes\VortexRoleplay.pwn(9213) : error 017: undefined symbol "RemoveBuildingForPlayer"
C:\Users\Will\Desktop\samp03x_svr_R2_win32\gamemodes\VortexRoleplay.pwn(9214) : error 017: undefined symbol "RemoveBuildingForPlayer"
C:\Users\Will\Desktop\samp03x_svr_R2_win32\gamemodes\VortexRoleplay.pwn(9215) : error 017: undefined symbol "RemoveBuildingForPlayer"
C:\Users\Will\Desktop\samp03x_svr_R2_win32\gamemodes\VortexRoleplay.pwn(9216) : error 017: undefined symbol "RemoveBuildingForPlayer"
C:\Users\Will\Desktop\samp03x_svr_R2_win32\gamemodes\VortexRoleplay.pwn(9217) : error 017: undefined symbol "RemoveBuildingForPlayer"
C:\Users\Will\Desktop\samp03x_svr_R2_win32\gamemodes\VortexRoleplay.pwn(9218) : error 017: undefined symbol "RemoveBuildingForPlayer"
C:\Users\Will\Desktop\samp03x_svr_R2_win32\gamemodes\VortexRoleplay.pwn(9219) : error 017: undefined symbol "RemoveBuildingForPlayer"
C:\Users\Will\Desktop\samp03x_svr_R2_win32\gamemodes\VortexRoleplay.pwn(9220) : error 017: undefined symbol "RemoveBuildingForPlayer"
C:\Users\Will\Desktop\samp03x_svr_R2_win32\gamemodes\VortexRoleplay.pwn(9223) : error 017: undefined symbol "RemoveBuildingForPlayer"
C:\Users\Will\Desktop\samp03x_svr_R2_win32\gamemodes\VortexRoleplay.pwn(9224) : error 017: undefined symbol "RemoveBuildingForPlayer"
C:\Users\Will\Desktop\samp03x_svr_R2_win32\gamemodes\VortexRoleplay.pwn(9225) : error 017: undefined symbol "RemoveBuildingForPlayer"
C:\Users\Will\Desktop\samp03x_svr_R2_win32\gamemodes\VortexRoleplay.pwn(9226) : error 017: undefined symbol "RemoveBuildingForPlayer"
C:\Users\Will\Desktop\samp03x_svr_R2_win32\gamemodes\VortexRoleplay.pwn(9227) : error 017: undefined symbol "RemoveBuildingForPlayer"
C:\Users\Will\Desktop\samp03x_svr_R2_win32\gamemodes\VortexRoleplay.pwn(9228) : error 017: undefined symbol "RemoveBuildingForPlayer"
C:\Users\Will\Desktop\samp03x_svr_R2_win32\gamemodes\VortexRoleplay.pwn(9229) : error 017: undefined symbol "RemoveBuildingForPlayer"
C:\Users\Will\Desktop\samp03x_svr_R2_win32\gamemodes\VortexRoleplay.pwn(9230) : error 017: undefined symbol "RemoveBuildingForPlayer"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors.
Reply

Do you have <a_samp> include at top of your script?
Reply

Update the server package, your a_samp.inc is for older version and those functions were not defined yet back then.
Reply

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Update the server package, your a_samp.inc is for older version and those functions were not defined yet back then.
All done! Those errors have all dissapeared, however i'm now getting this one.. I believe my GeoIP plugin is broken.. Here's the error:

Код:
[16:42:49]    Error: Function not registered: 'GetCountryName'
[16:42:49] Script[gamemodes/VortexRoleplay.amx]: Run time error 19: "File or function is not found"
Reply

Please update plugin for 0.3z during RC phase
Reply

Quote:
Originally Posted by LeaveMe
Посмотреть сообщение
Please update plugin for 0.3z during RC phase
The plugin is already updated for 0.3z
https://github.com/samp-incognito/sa...lugin/releases

Incognito: you should add the github link to the first post
Reply

Quote:
Originally Posted by Reboma
Посмотреть сообщение
The plugin is already updated for 0.3z
https://github.com/samp-incognito/sa...lugin/releases

Incognito: you should add the github link to the first post
Thanks

This release top feature should be
Added "drawdistance" to the end of CreateDynamicObject and "style" to the end of CreateDynamicMapIcon
Reply

Just found a bug, I suppose, I have compiled new gamemode with just these two functions at bottom.

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/sel", cmdtext, true, 10) == 0)
    {
        SelectObject(playerid);
        return 1;
    }
    return 0;
}
public OnPlayerEditObject(playerid, playerobject, objectid, response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ)
{
    SendClientMessage(playerid,-1,"OnPlayerEditObject on GM");
    return 1;
}
public OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ)
{
    printf("Player %d selected object %d", playerid, objectid);
    if(type == SELECT_OBJECT_GLOBAL_OBJECT)
    {
        EditObject(playerid, objectid);
    }
    else
    {
        EditPlayerObject(playerid, objectid);
    }
    SendClientMessage(playerid, 0xFFFFFFFF, "You now are able to edit your object!");
    return 1;
}

Without streamer plugin they are being called, but right after I add plugin and FS which use only CreateDynamicObject function, I don't get msg to chat: "OnPlayerEditObject on GM" nor printf("Player %d selected object %d", playerid, objectid); in server log. But after I unload Map FS , it works again.
Reply

Well done Incognito. I would like to contribute for a/some official update(s), where I would like to optimize the code at some cases, also I've got some ideas about new functions I would really like to implement, which should benefit map makers and scripters in a new way, only if you give me permission to do it.
Reply

Quote:
Originally Posted by BigETI
Посмотреть сообщение
Well done Incognito. I would like to contribute for a/some official update(s), where I would like to optimize the code at some cases, also I've got some ideas about new functions I would really like to implement, which should benefit map makers and scripters in a new way, only if you give me permission to do it.
It could only be a benefit to the plugin users!

Look at what BlueG achieved by opening his MySQL plugin up!
Reply

Right, after I worked over 6 hours, to find a soluition without knowing if I do something wrong, and finally when came up by combine SAMP objects and streamer object ids to get it working with original OnPlayerEditObject, you make this post grr... , but thanks anyways
Reply

Quote:
Originally Posted by BigETI
Посмотреть сообщение
Well done Incognito. I would like to contribute for a/some official update(s), where I would like to optimize the code at some cases, also I've got some ideas about new functions I would really like to implement, which should benefit map makers and scripters in a new way, only if you give me permission to do it.
Sure, you can fork the repository and do pull requests if you'd like.

Quote:
Originally Posted by ikey07
Посмотреть сообщение
Right, after I worked over 6 hours, to find a soluition without knowing if I do something wrong, and finally when came up by combine SAMP objects and streamer object ids to get it working with original OnPlayerEditObject, you make this post grr... , but thanks anyways
You can always check the commit history to see if I've made any changes.
Reply

Quote:
Originally Posted by Incognito
Посмотреть сообщение
Sure, you can fork the repository and do pull requests if you'd like.



You can always check the commit history to see if I've made any changes.
I did, but it was few hours ago :P
Reply

Hello there is a problem with this plugin on friend's server:
pawn Код:
Streamer_CallbackHook: Expecting 11 parameter(s), but found 3
Plugin is updated but this message appears :/ What to do?
Reply

This must be an issue within the OnPlayerEditObject hook. Did your "friend" compile his/her script with a modified streamer include? Does your "friend" use Streamer_CallbackHook somewhere else?
Reply

Quote:
Originally Posted by IstuntmanI
Посмотреть сообщение
A suggestion:
pawn Код:
native GetRandomPosInDynamicArea( areaid, &Float:X, &Float:Y, &Float:Z );

// returns X, Y, Z
// Z should be 0.0 in a basic-shaped area (circle, rectangle)
and:
pawn Код:
native GetRandomPlayerInDynamicArea( areaid ); // returns the ID of one of the players in areaid
native GetRandomPlayerInAnyDynamicArea( ); // returns the ID of one of the players in any area

native CountPlayersInDynamicArea( areaid ); // returns the number of players in areaid
native CountPlayersInAnyDynamicArea( ); // returns the number of players in any area

native GetPlayersInDynamicArea( areaid, players[ ] ); // fills players[ ] with the IDs of all players which are in areaid
native GetPlayersInAnyDynamicArea( players[ ] ); // fills players[ ] with the IDs of all players which are in any area

native GetPlayerDynamicAreas( playerid, areas[ ] ); // fills areas[ ] with the IDs of all dynamic areas in which is the player
A bug: IsPlayerInDynamicArea crashes the server with a invalid areaid, I know we should use IsValidDynamicArea, but still, it shouldn't crash the server.
Reply

I would really like to know, in which cases exactly are those random functions useful.

How should IsPlayerInDynamicArea crash the server?
Reply

Quote:
Originally Posted by BigETI
Посмотреть сообщение
I would really like to know, in which cases exactly are those random functions useful.
Some of them can be scripted, but they would be better integrated in the Streamer Plugin. Every function has it's use, we can find use for everything. I personally need just GetRandomPlayerInDynamicArea, instead of using a loop and getting the first player in it I would use that random thing. I would use it for a Deer Hunting system, so a deer will run away from a random player in its dynamic area, like it is scared and doesn't know where to go. And I suggested the rest of the functions because I thought they would be more useful than that function I need.

Few examples:
- CountPlayersInDynamicArea can be used in a Gang Base War, so you will know how many players are in that war.
* CountPlayersInAnyDynamicArea I don't see any use, but I don't see any use for IsAnyPlayerInAnyDynamicArea too, but it was still added, I think CountPlayersInAnyDynamicArea could be more useful than IsAnyPlayerInAnyDynamicArea.
- GetPlayersInDynamicArea could be used to get every player from that Gang Base War area, so you could list them.
* I don't see any use for GetPlayerDynamicAreas too, but maybe someone will find.

Every function can be useful for at least 1 server owner, if it is, then it's a "win".

----

I don't know if it's possible GetRandomPosInDynamicArea in a polygon.

EDIT:
Quote:
Originally Posted by BigETI
Посмотреть сообщение
How should IsPlayerInDynamicArea crash the server?
just use
pawn Код:
IsPlayerInDynamicArea( playerid, 1 );
or
pawn Код:
IsPlayerInDynamicArea( playerid, 2 );
or
pawn Код:
IsPlayerInDynamicArea( playerid, -1 );
or etc., if that areaid is not created. I had an issue with it few days ago, until I saw that areaid which I used wasn't valid.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)