12.04.2012, 23:49
It might be related to that bug, but it is still present in the latest RC:
That's all you need. Run that mode (no filterscripts), connect and spawn, then switch to something like LVDM - the server console will report that there are no attached objects:
And you will appear in the LVDM class selection with a huge turtle on your head. As I say, I've already written a fix for "fixes.inc", was just reporting it and looking for confirmation that I'm not doing something stupid.
I'm not sure if the fact that "IsPlayerAttachedObjectSlotUsed" returns 0 in "OnPlayerDisconnect" is related to the fact that the objects don't disappear (seems likely), but in my code at least I treated them as separate (as I didn't notice the link till you mentioned that it worked fine).
pawn Код:
#include <a_samp>
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(0, 0.0, 12.0, 4.0, 269.1425, 34, 100, 0, 0, 0, 0);
AddStaticVehicle(519, 0.0, 0.0, 5.0, 0.0, 0, 0);
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 0.0, 12.0, 4.0);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}
public OnPlayerDisconnect(playerid)
{
for (new i = 0; i != MAX_PLAYER_ATTACHED_OBJECTS; ++i)
{
new str[64];
format(str, sizeof (str), "%d: %d", i, IsPlayerAttachedObjectSlotUsed(playerid, i));
print(str);
}
}
public OnPlayerSpawn(playerid)
{
SetPlayerAttachedObject(playerid, 0, 1609, 2);
}
Код:
0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 6: 0 7: 0 8: 0 9: 0
I'm not sure if the fact that "IsPlayerAttachedObjectSlotUsed" returns 0 in "OnPlayerDisconnect" is related to the fact that the objects don't disappear (seems likely), but in my code at least I treated them as separate (as I didn't notice the link till you mentioned that it worked fine).