Jump to content

dariumare

Membru
  • Posts

    18
  • Joined

  • Last visited

    Never

Posts posted by dariumare

  1. dariumare's Fight Styles System v1.0



    Descriere:

    • Cu acest fs veti putea merge in gym deunde sa invatati fightstyle care se salveaza sql
      Am lucrat 5 ore la el1
      Este 100% facut de mine


    Comenzi:
    • /learn - /learn si stilul de lupta, trebuie sa fii in gym si te costa 10.000$
    • /fightstyle - /fightstyle si numele stilului

    Download:

    Pastebin

    Download 1

    Credits:

    • dariumare - for filterscript
    • Zh3r0 - for SQLite tutorial
    • SAMP Team - pentru SQLite in sampl

    Bugs:

    Eu nu am gasit nici unul dar daca gasiti postati aici!

    PS. Este primul meu filterscript decinu va luati de mine!

  2. 1. Nush

    2.

    dcmd_giveallweapon(playerid,params[])
    {
    	if(PlayerInfo[playerid][Level] >= 9)
    	{
    	    new tmp[256], tmp2[256], Index, weap, WeapName[32], string[128];
    		tmp = strtok(params,Index);
    new ammo = strval(tmp);
    		tmp2 = strtok(params,Index);
    	    if(!strlen(tmp) ) return SendClientMessage(playerid, red, "USAGE: /giveallweapon [weapon id/weapon name] [ammo]");
    		if(!strlen(tmp2) || !IsNumeric(tmp2) || strval(tmp2) <= 0 || strval(tmp2) > 99999);
    		if(!IsNumeric(tmp)) weap = GetWeaponIDFromName(tmp); else weap = strval(tmp);
    	  	if(!IsValidWeapon(weap)) return SendClientMessage(playerid,red,"ERROR: Invalid weapon ID");
          	CMDMessageToAdmins(playerid,"GIVEALLWEAPON");
    		for(new i = 0; i < MAX_PLAYERS; i++)
    		{
    			if(IsPlayerConnected(i))
    		 	{
    				PlayerPlaySound(i,1057,0.0,0.0,0.0);
    				GivePlayerWeapon(i,weap,ammo);
    			}
    		}
    		GetWeaponName(weap, WeapName, sizeof(WeapName) );
    		format(string,sizeof(string),"Administrator \"%s\" has given all players a %s (%d) with %d rounds of ammo", pName(playerid), WeapName, weap, ammo);
    		return SendClientMessageToAll(blue, string);
    	} else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
    }

    3.  Nu inteleg ce teai complicat la comanda aia

  3. tu doar ai dat copy +paste de la el si ai zis o tempnie uriasa :)) ca el avea deja asa :)

    si tu vrei sa folosesti aceste Color1 .Color2 ca pe niste culori sa presupun ,si atunci trebuie sa te duci la

    public OnPlayerUpdate(playerid)

    {

    PlayerKnow[playerid][Color1] = GetPlayerColor(playerid);

    si la 2 cred ca cam la fel..

    }

    MS

  4. am creat un enum si imi da o gramad de erori:

    enum pKnow
    {
    	Boxing,
    	Kungfu,
    	Kneehead,
    	Grabkick,
    	Elbow,
    };
    new PlayerKnow[MAX_PLAYERS][pKnow];
    si primesc
    C:\Users\Patricia\Downloads\Grand.Theft.Auto.San.Andreas-HOODLUM\SAMP\filterscripts\FFS.pwn(79) : warning 219: local variable "ID" shadows a variable at a preceding level
    C:\Users\Patricia\Downloads\Grand.Theft.Auto.San.Andreas-HOODLUM\SAMP\filterscripts\FFS.pwn(83) : error 022: must be lvalue (non-constant)
    C:\Users\Patricia\Downloads\Grand.Theft.Auto.San.Andreas-HOODLUM\SAMP\filterscripts\FFS.pwn(84) : warning 213: tag mismatch
    C:\Users\Patricia\Downloads\Grand.Theft.Auto.San.Andreas-HOODLUM\SAMP\filterscripts\FFS.pwn(84) : warning 206: redundant test: constant expression is non-zero
    C:\Users\Patricia\Downloads\Grand.Theft.Auto.San.Andreas-HOODLUM\SAMP\filterscripts\FFS.pwn(79) : warning 203: symbol is never used: "Kungfu"
    C:\Users\Patricia\Downloads\Grand.Theft.Auto.San.Andreas-HOODLUM\SAMP\filterscripts\FFS.pwn(101) : warning 219: local variable "Kneehead" shadows a variable at a preceding level
    C:\Users\Patricia\Downloads\Grand.Theft.Auto.San.Andreas-HOODLUM\SAMP\filterscripts\FFS.pwn(105) : error 022: must be lvalue (non-constant)
    C:\Users\Patricia\Downloads\Grand.Theft.Auto.San.Andreas-HOODLUM\SAMP\filterscripts\FFS.pwn(106) : warning 213: tag mismatch
    C:\Users\Patricia\Downloads\Grand.Theft.Auto.San.Andreas-HOODLUM\SAMP\filterscripts\FFS.pwn(106) : warning 205: redundant code: constant expression is zero
    C:\Users\Patricia\Downloads\Grand.Theft.Auto.San.Andreas-HOODLUM\SAMP\filterscripts\FFS.pwn(101) : warning 203: symbol is never used: "Kneehead"
    C:\Users\Patricia\Downloads\Grand.Theft.Auto.San.Andreas-HOODLUM\SAMP\filterscripts\FFS.pwn(123) : warning 219: local variable "Grabkick" shadows a variable at a preceding level
    C:\Users\Patricia\Downloads\Grand.Theft.Auto.San.Andreas-HOODLUM\SAMP\filterscripts\FFS.pwn(127) : error 022: must be lvalue (non-constant)
    C:\Users\Patricia\Downloads\Grand.Theft.Auto.San.Andreas-HOODLUM\SAMP\filterscripts\FFS.pwn(128) : warning 213: tag mismatch
    C:\Users\Patricia\Downloads\Grand.Theft.Auto.San.Andreas-HOODLUM\SAMP\filterscripts\FFS.pwn(128) : warning 205: redundant code: constant expression is zero
    C:\Users\Patricia\Downloads\Grand.Theft.Auto.San.Andreas-HOODLUM\SAMP\filterscripts\FFS.pwn(123) : warning 203: symbol is never used: "Grabkick"
    C:\Users\Patricia\Downloads\Grand.Theft.Auto.San.Andreas-HOODLUM\SAMP\filterscripts\FFS.pwn(145) : warning 219: local variable "Elbow" shadows a variable at a preceding level
    C:\Users\Patricia\Downloads\Grand.Theft.Auto.San.Andreas-HOODLUM\SAMP\filterscripts\FFS.pwn(149) : error 022: must be lvalue (non-constant)
    C:\Users\Patricia\Downloads\Grand.Theft.Auto.San.Andreas-HOODLUM\SAMP\filterscripts\FFS.pwn(150) : warning 213: tag mismatch
    C:\Users\Patricia\Downloads\Grand.Theft.Auto.San.Andreas-HOODLUM\SAMP\filterscripts\FFS.pwn(150) : warning 205: redundant code: constant expression is zero
    C:\Users\Patricia\Downloads\Grand.Theft.Auto.San.Andreas-HOODLUM\SAMP\filterscripts\FFS.pwn(145) : warning 203: symbol is never used: "Elbow"
    C:\Users\Patricia\Downloads\Grand.Theft.Auto.San.Andreas-HOODLUM\SAMP\filterscripts\FFS.pwn(177) : error 017: undefined symbol "Result"
    C:\Users\Patricia\Downloads\Grand.Theft.Auto.San.Andreas-HOODLUM\SAMP\filterscripts\FFS.pwn(179) : error 017: undefined symbol "Result"
    C:\Users\Patricia\Downloads\Grand.Theft.Auto.San.Andreas-HOODLUM\SAMP\filterscripts\FFS.pwn(181) : error 017: undefined symbol "Result"
    C:\Users\Patricia\Downloads\Grand.Theft.Auto.San.Andreas-HOODLUM\SAMP\filterscripts\FFS.pwn(183) : error 017: undefined symbol "Result"
    C:\Users\Patricia\Downloads\Grand.Theft.Auto.San.Andreas-HOODLUM\SAMP\filterscripts\FFS.pwn(185) : error 017: undefined symbol "Result"
    Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase
    
    
    9 Errors.
    

  5. Cum ai rezolvat ? cu db_query ? cum ti-am zis eu

    Nu nu are nici o legatura db_query si db_freeresult fac acelasi lucru numai ca db_freeresult elimina toata informatia

    an rezolvat cu:

    Nu trebuia asa:

    format(Query, sizeof(Query), "UPDATE `FightStyles` SET `Boxing` = '%d' WHERE `Nume` = '%s'",boxing, playerid);

    ci trebuia

    format(Query, sizeof(Query), "UPDATE `FightStyles` SET `Boxing` = '%d' WHERE `Nume` = '%s'",boxing, Name(playerid));

    si mai jos:

    Name(i){
    	new n[24];
    	GetPlayerName(i,n,24);
    	return n;
    }

  6. Am facut un fs si lam compilat si nu mi-a dat erori dar cand scriu comanda in joc nu merge ce am gresit

    	if(strcmp(cmd, "/boxing", true) == 0)
    	{
    	    new Query[256];
    	    new boxing = 1;
    	    format(Query, sizeof(Query), "UPDATE `FightStyles` SET `Boxing` = '%d' WHERE `Nume` = '%s'",boxing, playerid);
    	    db_free_result(db_query(Database, Query));
    	    SendClientMessage(playerid, COLOR_WHITE, "Bravo, ai invatat boxing!");
    		return 1;
    	}

  7. am primit niste erori si nustiu cum sa le rezolv:

    D:\Resurse\SAMP\gamemodes\OnlyKill.pwn(28085) : error 036: empty statement
    D:\Resurse\SAMP\gamemodes\OnlyKill.pwn(28112) : error 029: invalid expression, assumed zero
    Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase
    
    
    2 Errors.
    
    si aici liniile:
    if(strcmp(cmd, "/examen", true) == 0)
        {
           	if(PlayerToPoint(5.0,playerid,1413.2693,-1700.6459,13.5395))
           	{
    			if(PlayerInfo[playerid][pPP] == 15); //linia 28085
    			{
             		if(GetPlayerCash(playerid) >= 500)
             		{
               			if(PlayerInfo[playerid][pCarLic] == 0)
               			{
                 			if(DMVPrepare[playerid] == 0)
              				{
                   				DMVPrepare[playerid] = 1;
                      			GivePlayerCash(playerid,-5000);
                      			GameTextForPlayer(playerid, "~r~~h~-5000", 5000, 1);
                 			}
                    		else
                    		{
                   				SendClientMessage(playerid,COLOR_GREY,"Deja dai testul !");
                 			}
                		}
                		else
                		{
              				SendClientMessage(playerid,COLOR_GREY,"Deja ai licenta de sofer !" );
               			}
            		}
            		else
            		{
               			SendClientMessage(playerid,COLOR_GREY,"Nu ai bani pentru a da testul !");
      				}
    			}
    			else //linia 28112
    			{
    			    SendClientMessage(playerid,COLOR_GREY, "Ai 15 puncte penalizare, fa cerere pe forum pentru a primi carnetul inapoi !");
    			}
    
     		}
        }

  8. Uitati am am facut asa

    Am pus un timer si tot nu merge

    new tim1;
    tim1 = SetTimer("Door0open",1,true)
    //public
    public Door0open()
    {
    	new Float:a, Float:b, Float:c;
    	new Float:x, Float:y, Float:z;
    	a = 1571.34863281;
    	b = -1636.45898438;
    	c = 12.70115089;
    	new lift0 = GetObjectPos(lift, x, y, z);
    	if(lift0 == a,b,c)
    	{
    		MoveDynamicObject(door0a,1568.36059570,-1635.38269043,13.54676056,4.0);
    		MoveDynamicObject(door0b,1568.36059570,-1635.38183594,15.04676056,4.0);
    		liftpos = 0;
    		KillTimer(tim1);
    	}
    }
    	

  9. n-am inteles nimic :|

    Deci, am facut un lift la Police Departament cu care sa ajungi pe cladire la elicopter. Eu vreau ca doar cand ajungi sus sa se deschida usa, nu inainte. Uite un alt link la pastebin http://pastebin.com/6vSpJYP9

  10. Deci am facut un lift la PD care sa urce sus si vreau ca doar can ajunge liftul jos sau sus sa se deschida usa nu inainte!Help

    http://paste2.org/p/1499397(pastebin nu merge)

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