[FilterScript] PlayerKeysInclude for sciprters(not beginers)
#1

Код:
#include <a_samp>
new KeysNum[15][1]={
{1},
{2},
{4},
{8},
{16},
{32},
{64},
{128},
{256},
{512},
{1024},
{2048},
{4096},
{8192},
{16384}
};
forward GetPressKey(id);
public GetPressKey(id)
{
	for(new a=0;a<15;a++)
	{
	    if(id>=KeysNum[a][0]&&KeysNum[a][0]>0)
	    {
	        if(id==KeysNum[a][0]){printf("%d",KeysNum[a][0]);}
			for(new b=0;b<15;b++)
			{
			    if(id>=KeysNum[a][0]+KeysNum[b][0]&&KeysNum[b][0]>0)
	    		{
	    		    if(a!=b&&id==KeysNum[a][0]+KeysNum[b][0]&&KeysNum[a][0]>KeysNum[b][0]){printf("%d %d",KeysNum[a][0],KeysNum[b][0]);}
		    		for(new c=0;c<15;c++)
					{
						if(id>=KeysNum[a][0]+KeysNum[b][0]+KeysNum[c][0]&&KeysNum[c][0]>0)
	    				{
	    				    if(a!=b&&b!=c&&id==KeysNum[a][0]+KeysNum[b][0]+KeysNum[c][0]&&KeysNum[a][0]>KeysNum[b][0]&&KeysNum[b][0]>KeysNum[c][0]){printf("%d %d %d",KeysNum[a][0],KeysNum[b][0],KeysNum[c][0]);}
	    				    for(new d=0;d<15;d++)
							{
							    if(id>=KeysNum[a][0]+KeysNum[b][0]+KeysNum[c][0]+KeysNum[d][0]&&KeysNum[c][0]>0)
	    						{
									if(a!=b&&b!=c&&c!=d&&id==KeysNum[a][0]+KeysNum[b][0]+KeysNum[c][0]+KeysNum[d][0]&&KeysNum[a][0]>KeysNum[b][0]&&KeysNum[b][0]>KeysNum[c][0]&&KeysNum[c][0]>KeysNum[d][0]){printf("%d %d %d %d",KeysNum[a][0],KeysNum[b][0],KeysNum[c][0],KeysNum[d][0]);}
	    				    		for(new e=0;e<15;e++)
									{
									    if(id>=KeysNum[a][0]+KeysNum[b][0]+KeysNum[c][0]+KeysNum[d][0]+KeysNum[e][0]&&KeysNum[c][0]>0)
	    								{
                                            if(a!=b&&b!=c&&c!=d&&d!=e&&id==KeysNum[a][0]+KeysNum[b][0]+KeysNum[c][0]+KeysNum[d][0]+KeysNum[e][0]&&KeysNum[a][0]>KeysNum[b][0]&&KeysNum[b][0]>KeysNum[c][0]&&KeysNum[c][0]>KeysNum[d][0]&&KeysNum[d][0]>KeysNum[e][0]){printf("%d %d %d %d %d",KeysNum[a][0],KeysNum[b][0],KeysNum[c][0],KeysNum[d][0],KeysNum[e][0]);}
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
}
public OnFilterScriptInit()
{
    return 1;
}

public OnPlayerUpdate(playerid)
{
	new name[64];
	GetPlayerName(playerid,name,64);
	if(strcmp(name, "yourname", true) == 0)
	{
    	new Keys,ud,lr;
    	GetPlayerKeys(playerid,Keys,ud,lr);
    	if(Keys!=ud&&Keys!=lr)
    	{
    		//printf("%d) keys : %d ud : %d lr : %d",playerid,Keys,ud,lr);
    		GetPressKey(Keys);
    	}
	}
	return 1;
}
made by me.
not for beginers.
The console showed such as "16 4 2"
means the player "yourname" is pressed mouse1 + enter + c
you can make a public like
OnPlayerPressF
OnPlayerPressMouse1
by this function
Reply


Messages In This Thread
PlayerKeysInclude for sciprters(not beginers) - by oicq747285250 - 13.09.2011, 05:30
Re: PlayerKeysInclude for sciprters(not beginers) - by Emmet_ - 13.09.2011, 05:51
Re: PlayerKeysInclude for sciprters(not beginers) - by Z0mBie - 13.09.2011, 05:51
Re: PlayerKeysInclude for sciprters(not beginers) - by On_Top_Non_Stop - 15.09.2011, 17:56
Re: PlayerKeysInclude for sciprters(not beginers) - by steki. - 15.09.2011, 18:01
Re: PlayerKeysInclude for sciprters(not beginers) - by Stepashka - 15.09.2011, 18:12
Re: PlayerKeysInclude for sciprters(not beginers) - by iPLEOMAX - 16.09.2011, 05:12

Forum Jump:


Users browsing this thread: 2 Guest(s)