15.04.2014, 19:21
Or probably missing that from include.
pawn Код:
#define BULLET_HIT_TYPE_PLAYER_OBJECT 4
#define BULLET_HIT_TYPE_PLAYER_OBJECT 4
Why isn't OnPlayerPickUpDynamicPickup called when a player is in a vehicle?
|
Streamer_GetUpperBound(STREAMER_TYPE_OBJECT);
//or
CountDynamicObjects();
Streamer_CountItems(type, serverwide = 1);
Keep in mind the total amount of objects is not the same as the highest object ID.
|
Streamer_GetUpperBound(STREAMER_TYPE_OBJECT); is the way to go with looping through all objects.
That function will always return the highest object ID in the list, while CountDynamicObjects just counts the amount of objects in the list. This would mean if the list consists of {0, 1, 5, 8}, it would mean that with CountDynamicObjects it would only get ID 0 and 1, because the total amount of objects is four. While GetUpperBound would get 0, 1, 5 and 8 in your loop, as it gets the highest possible number, which is 8. |
Streamer_CountItems(type, serverwide = 1);
Also anyone know what the last parameter does on
pawn Код:
|
That was added in 2.7, see this https://github.com/samp-incognito/sa...eases/tag/v2.7
|
*** Streamer_AppendArrayData: Invalid ID specified
If you have not used the AppendArrayData function yourself, it might be in another include or filterscript you have downloaded. I suggest you just open a few files and CTRL+F (search) for "AppendArrayData" to quickly find the exact spot where it's used. You could then report this bug to the maker of the script, maybe he'll give you a fix.
|
new StringName[31];
format(StringName, sizeof(StringName),"%s (%d)", PlayerData[playerid][E_PLAYER_NAME], playerid);
PlayerData[playerid][E_PLAYER_NICK] = CreateDynamic3DTextLabel(StringName, COLOR_NICK, 0.0, 0.0, 0.12, 10.0, playerid, INVALID_VEHICLE_ID, true);
if(IsValidDynamic3DTextLabel(Text3D:PlayerData[playerid][E_PLAYER_NICK]))
{
DestroyDynamic3DTextLabel(Text3D:PlayerData[playerid][E_PLAYER_NICK]);
}
PlayerData[playerid][E_PLAYER_NICK] = Text3D:INVALID_3DTEXT_ID;