Jump to content

Tutoriale/Comenzi/Functii/Informatii


cmg4life

Recommended Posts

  • Replies 183
  • Created
  • Last Reply

Top Posters In This Topic

  • 2 weeks later...

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.

Link to comment
Share on other sites

  • 4 weeks later...

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.

Link to comment
Share on other sites

  • 2 weeks later...

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]

Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
Share on other sites

  • 2 months later...

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.