Hey,
It does not call back anything.
Code: public OnPlayerEditDynamicObject(playerid, objectid, response, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz)
{
printf("test");
}
After click on the save or cancel button, nothing happens.
Version :?*** Streamer Plugin v2.9.4 by Incognito loaded ***
Please help me about this ...
Salut, make sure you do everything right. I will leave you an example below.
Code: new test_object[MAX_PLAYERS]; //a global variable
public OnPlayerConnect(playerid) {
test_object[playerid]=0;
return 1;
}
public OnPlayerDisconnect(playerid, reason) {
if(test_object[playerid]) DestroyDynamicObject(test_object[playerid]);
return 1;
}
CMD:testobj(playerid, params[]) {
new idobject;
if(sscanf(params, "i", idobject)) return SendClientMessage(playerid, COLOR_GREY, "Syntax:{FFFFFF} /editobj <id object>");
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if(test_object[playerid] != 0) return SendClientMessage(playerid, COLOR_AWARNING, "You already edit a object.");
//create a object putting a objectid aleatory (eg: /testobj 2943)
test_object[playerid] = CreateDynamicObject(idobject, x, y, z, 0, 0, 0);
EditDynamicObject(playerid, test_object[playerid]);
return 1;
}
public OnPlayerEditDynamicObject(playerid, STREAMER_TAG_OBJECT objectid, response, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz) {
switch(response) {
case EDIT_RESPONSE_CANCEL, EDIT_RESPONSE_FINAL: SendClientMessage(playerid, -1, "the function works");
}
return 1;
}
Try to disable filterscripts, it might be called in FS first and one of em is blocking it.
(2020-10-10, 06:10 PM)BoNNe Wrote: Salut, make sure you do everything right. I will leave you an example below.
I try it but not working ...
(2020-10-15, 01:15 PM)Expert* Wrote: Try to disable filterscripts, it might be called in FS first and one of em is blocking it.
My?OnPlayerEditDynamicObject is in filterscript not in gamemode
2020-10-16, 03:50 PM
(This post was last modified: 2020-10-16, 03:55 PM by morem.)
Problem fixed.
I tried put my filterscript on first in server.cfg filterscripts.
and
change OnPlayerEditDynamicObject in my gamemode to return 0.
|