Jump to content
Autentificarea cu Google și Facebook nu mai este disponibilă. ×

Recommended Posts

Posted

mda...chiar ca nu stiu ce sa ii fac:))

mdadc.jpg

Loose Identation inseamna ca codul tau nu este bine identat, alineaza liniile cum trebuie sa arate impecabil.

  • Replies 183
  • Created
  • Last Reply

Top Posters In This Topic

Posted

Loose Identation inseamna ca codul tau nu este bine identat, alineaza liniile cum trebuie sa arate impecabil.

am rezolvat problema....dar acm nu se deschide cand ajung la poarta nu se deschide decat dupa ce scriu /deschide si am eliminat acel if() cu /deschide:)

  • 2 weeks later...
Posted

Parametrii compiler:

Pawn compiler 3.2.3664                  Copyright © 1997-2006, ITB CompuPhase

Usage:  pawncc <filename> [filename...] [options]

Options:

        -A<num>  alignment in bytes of the data segment and the stack

        -a      output assembler code

        -C[+/-]  compact encoding for output file (default=+)

        -c<name> codepage name or number; e.g. 1252 for Windows Latin-1

        -Dpath  active directory path

        -d<num>  debugging level (default=-d1)

            0    no symbolic information, no run-time checks

            1    run-time checks, no symbolic information

            2    full debug information and dynamic checking

            3    same as -d2, but implies -O0

        -e<name> set name of error file (quiet compile)

        -H<hwnd> window handle to send a notification message on finish

        -i<name> path for include files

        -l      create list file (preprocess only)

        -o<name> set base name of (P-code) output file

        -O<num>  optimization level (default=-O1)

            0    no optimization

            1    JIT-compatible optimizations only

            2    full optimizations

        -p<name> set name of "prefix" file

        -r[name] write cross reference report to console or to specified file

        -S<num>  stack/heap size in cells (default=4096)

        -s<num>  skip lines from the input file

        -t<num>  TAB indent size (in character positions, default=8)

        -v<num>  verbosity level; 0=quiet, 1=normal, 2=verbose (default=1)

        -w<num>  disable a specific warning by its number

        -X<num>  abstract machine size limit in bytes

        -XD<num> abstract machine data/stack size limit in bytes

        -\      use '\' for escape characters

        -^      use '^' for escape characters

        -;[+/-]  require a semicolon to end each statement (default=-)

        -([+/-]  require parantheses for function invocation (default=-)

        sym=val  define constant "sym" with value "val"

        sym=    define constant "sym" with value 0

Options may start with a dash or a slash; the options "-d0" and "/d0" are

equivalent.

Options with a value may optionally separate the value from the option letter

with a colon (":") or an equal sign ("="). That is, the options "-d0", "-d=0"

and "-d:0" are all equivalent.

Process returned 3 (0x3)  execution time : 0.031 s

Press any key to continue.

Le-am scos cu CODE::BLOCKS.

  • 4 weeks later...
Posted

Am facut o lista de coduri de culori HEX si Pawno (separate).

http://www.xerom-zone.ro/index.php?action=culorihex

cmg4life a vazut lista si mi-a zis sa-l postez pe aici. ;)

PS: Daca Ninja va vrea sa fac o pagina deasta si pe forumul asta, o sa fac. ;)

logo.png

ATENTIE!!! Nu imi trimiteti mesaje private care au legatura cu scriptingul. NU mai scriptez.

  • 2 weeks later...
Posted

stock ReadFromTo(File[],const StartStr[],getingValue[][],const EndStr[]="Stop",length=sizeof(getingValue[]))
{
	#if defined and
	#undef and
	#endif
	#define and ;
	for(new i;i<sizeof(getingValue[][]);i++)
	{
	strdel(getingValue[i],0,strlen(getingValue[i]));
	}
	new
		i,
		string[512],
		bool:State
		;
	if( !fexist( File ) )
					return printf("I can't load file %s", File);
	new File:Handler = fopen(File, io_read);
	WHILE:while(fread(Handler, string))
	{
	        if(State == false)
	        {
				if(strfind(string, StartStr)>=0)
				{
					State = true;
					goto WHILE and break;
				}
			}
			else
			{
				if(strfind(string, EndStr)>=0)
				{
					State = false;
					break;
				}
				strmid(getingValue[i], string, 0,strlen(string)-1,length);
				i++;
				goto WHILE and break;
			}
	}
	fclose( Handler );
	#undef and
	return i;
}
stock GetKey(string[])
{
	new
		tmp[256],
		pos=GetPosInStr(string,"="),
		len=strlen(string)
		;
	format(tmp,256,"%s",string[len-pos+2]);
	return tmp;
}
Example: test.ini
INFO
servername=Clevusca
password=bitch
gamemodename=Marmota ataca,2
End
Stats
spawnpos= 2.0 2.0 2.0
camerapos = 4.0 4.0 4.0
End
new strs[7][66];
ReadFromTo("test.ini","INFO",strs,"End");
SetGameModeText(GetKey(str[2]));
new inf[30];
format(inf,30,"rcon_password %s",GetKey(str[1]));
SendRconCommand(inf);
format(info,30,"gamemodetext %s",GetKey(str[0]));

ReadFromTo("test.ini","Stats",strs,"End");
...
[code]

  • 2 weeks later...
Posted

am rezolvat problema....dar acm nu se deschide cand ajung la poarta nu se deschide decat dupa ce scriu /deschide si am eliminat acel if() cu /deschide:)
Nu numai ca se deschide la comanda /deschide, ci si la toate 'comenzile' atat existente, cat si inexistente. Daca vrei sa se deschida atunci cand o tasta ( VK_SAMP_KEY_AVAIBLE ) este folosita, atunci bagi codul asta la OnPlayerKeyStateChange, si ii mai pui conditia asta: if(newkeys & (APASA AICI PENTRU ID-UL TASTEI)) Uite un exemplu:
    if(IsPlayerInRangeOfPoint(playerid, range , x , y , z ) && (newkeys & KEY_FIRE))
    {
     if(IsACop(playerid))
     {
        MoveObject(poartapd,1596.77136200,-1637.92077600,15.07157900, 5);
        SetTimerEx("GateClosse", 5000, 0, "", playerid); //5 secunde , nu se repeta, valoarea este integer pt playerid
        return 1;
      }
    }

Iar acest lucru: SetTimerEx("GateClosse", 5000, 0, "", playerid); //5 secunde , nu se repeta, valoarea este integer pt playerid, este cea mai mare prostie pe care am auzit-o. De aceea, te-as ruga sa postezi antetul functiei GateClosse.

  • 2 months later...
Posted

Da viteza masini

stock SetVehicleSpeed(vehicleid, Float:Speed)
{
    new
        Float:X,
        Float:Y,
        Float:Z,
        Float:Angle;

    GetVehicleZAngle(vehicleid, Angle);
    Speed = Speed/200;
    X = Speed * floatsin(-Angle, degrees);
    Y = Speed * floatcos(-Angle, degrees);
    SetVehicleVelocity(vehicleid, X, Y, Z);
} 

lol

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.