28.01.2014, 16:24
Just found a bug, I suppose, I have compiled new gamemode with just these two functions at bottom.
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.
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.