SA-MP Forums Archive
Help change to drag - 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: Help change to drag (/showthread.php?tid=507173)



Help change to drag - Shazwan - 16.04.2014

This is the saving code, but it doest work on the drag toys. How to change it to dragging saving toys?

Код:
if(dialogid == EDITTOYSPX)
	{
	    if(response)
	    {
	        new Float:offset = floatstr(inputtext);
	        if(offset < -100) offset = 0;
			else if(offset > 100) offset = 100;
	        offset = offset/100;
	        PlayerToyInfo[playerid][slotselection[playerid]][ptPosX] = offset;
		}
		ShowEditMenu(playerid);
	}
	if(dialogid == EDITTOYSPY)
	{
	    if(response)
	    {
	        new Float:offset = floatstr(inputtext);
     		if(offset < -100) offset = 0;
			else if(offset > 100) offset = 100;
	        offset = offset/100;
	        PlayerToyInfo[playerid][slotselection[playerid]][ptPosY] = offset;
		}
		ShowEditMenu(playerid);
	}
	if(dialogid == EDITTOYSPZ)
	{
	    if(response)
	    {
	        new Float:offset = floatstr(inputtext);
	        if(offset < -100) offset = 0;
			else if(offset > 100) offset = 100;
			offset = offset/100;
	        PlayerToyInfo[playerid][slotselection[playerid]][ptPosZ] = offset;
		}
		ShowEditMenu(playerid);
	}
	if(dialogid == EDITTOYSRX)
	{
	    if(response)
	    {
	        new Float:offset = floatstr(inputtext);
	        if(offset < -100) offset = 0;
			else if(offset > 360) offset = 360;
	        PlayerToyInfo[playerid][slotselection[playerid]][ptRotX] = offset;
		}
		ShowEditMenu(playerid);
	}
	if(dialogid == EDITTOYSRY)
	{
	    if(response)
	    {
	        new Float:offset = floatstr(inputtext);
	        if(offset < -100) offset = 0;
			else if(offset > 360) offset = 360;
	        PlayerToyInfo[playerid][slotselection[playerid]][ptRotY] = offset;
		}
		ShowEditMenu(playerid);
	}
	if(dialogid == EDITTOYSRZ)
	{
	    if(response)
	    {
	        new Float:offset = floatstr(inputtext);
	        if(offset < -100) offset = 0;
			else if(offset > 360) offset = 360;
	        PlayerToyInfo[playerid][slotselection[playerid]][ptRotZ] = offset;
		}
		ShowEditMenu(playerid);
	}