SA-MP Forums Archive
YSI callback bug [+3 rep] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: YSI callback bug [+3 rep] (/showthread.php?tid=472005)



YSI callback bug [+3 rep] - DarkZeroX - 26.10.2013

Hi, I have a problem, with Y_COMMAND and the safeguard via YSI, in fact, the callback's who were added then 0.3e doesn't work, some function like the callback used for mselection, thanks you.


Re: YSI callback bug [+3 rep] - DarkLored - 26.10.2013

You need to update the Ysi
and if it isnt fixing your problem post your code so we can see the errors


Re : YSI callback bug [+3 rep] - DarkZeroX - 26.10.2013

Link please ?


Re: YSI callback bug [+3 rep] - DarkLored - 26.10.2013

Here's the link
https://sampforum.blast.hk/showthread.php?pid=1696956#pid1696956


Re : YSI callback bug [+3 rep] - DarkZeroX - 26.10.2013

it does not work :/

Here the callback does not work.
Код:


public OnPlayerEditObject(playerid, playerobject, objectid, response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ)
{
	printf("Does ?");
	new Float:oldX, Float:oldY, Float:oldZ,
		Float:oldRotX, Float:oldRotY, Float:oldRotZ;
	GetObjectPos(objectid, oldX, oldY, oldZ);
	GetObjectRot(objectid, oldRotX, oldRotY, oldRotZ);
	if(!playerobject)
	{
	    if(!IsValidObject(objectid)) return;
	    MoveObject(objectid, fX, fY, fZ, 10.0, fRotX, fRotY, fRotZ);
	}
}

stock afficherDialogSeven(playerid)
{
	new Achat[11];
	Achat[0] = 19513;
	Achat[1] = 2894;
	Achat[2] = 19171;
	Achat[3] = 2894;
	Achat[4] = 18645;
	ShowModelSelectionMenuEx(playerid,Achat,5, "27/7", Boite_A_Achat24, 16.0, 0.0, -55.0);
	return 1;
}

public OnPlayerModelSelectionEx(playerid, response, extraid, modelid)
{
    SendClientMessage(playerid,-1,"Does 1");
    if(extraid == Boite_A_Achat24)
    {
        SendClientMessage(playerid,-1,"Does2");
        if(response)
        {
		     if(modelid == 19513)
		     {
			     AddItem(playerid,"Telephone mobile",1);
		     }
		     else if(modelid == 2894)
		     {
			     AddItem(playerid,"Credit de telephone 25$",1);
		     }
		     else
		     {
				 SendClientMessage(playerid,-1,"Does100");
		     }
	}
        else
        {
		     SendClientMessage(playerid,-1,"Does200");
	}
	return 1;
    }
}
No printf is displayed.


Re: YSI callback bug [+3 rep] - Max_Coldheart - 26.10.2013

You are creating a callback in this script but are never calling it. That is why it is not showing you the "printf". If you have the callback called somewhere, please show us that part of the script also.


Re : YSI callback bug [+3 rep] - DarkZeroX - 26.10.2013

Код:
	if(dialogid==DIALOGUEC+1)
	{
		if(response)
		{
 	        Etape[playerid][1] = strval(inputtext);
 	        new Float:X,Float:Y,Float:Z;
 	        GetPlayerPos(playerid,X,Y,Z);
 	        Objet[playerid] = CreateObject(Etape[playerid][0],X,Y,Z,0.0,0.0,0.0,1.5);
	        SaveEtape[playerid] = 0;
	        EditObject(playerid,Objet[playerid]);
	        SendPlayerMessage(playerid, "{9DEB00}Move-Object", "Veuillez mettre зa position quand l'objet sera fermer.");
		}
		return 1;
	}
Another callback is called "ShowDialogSeven(playerid)"