Jump to content

Yamato

Membru
  • Posts

    48
  • Joined

  • Last visited

Posts posted by Yamato

  1. Salutare , astazi m-am decis sa fac un tutorial despre cum se poate proteja o anumita categorie de playeri. Spre exemplu eu sunt admin si sunt absolut normal pe server , dar cand dau /aod, pot fii omorat sau diverse chestii deranjante . Astazi o sa invatam daca un player admin este on duty , si cineva il ataca , sa i se scada HP si sa i se dea slap.

     

    Mergem la public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid) si adaugam asta:

     

    if(AdminDuty[damagedid] == 1) //verificam daca playerul atacat este admin on duty
    {
    	new Float:plx, Float:ply, Float:plz; //definim plx, ply, plz
    	GetPlayerPos(playerid, plx, ply, plz); //luam coordonatele adminului
    	SetPlayerPos(playerid, plx, ply, plz+3); //setam coordonata z a atacatorului cu +3 (ii dam slap)
    	new Float:playerHealth = 0; //definim playerhealth
        GetPlayerHealth ( playerid, playerHealth ); //luam health playerului actual 
        SetPlayerHealth(playerid, ( playerHealth - 20 ) ); //setam sa i se scada din health actual al playerului -20. 
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Acest player este On-Duty"); // trimitem mesaj atacatorului
        SendClientMessage(playerid, 0xFFFFFFFF, "Ti-a scazut viata pentru ca ai atacat un player On-Duty!"); //trimitem mesaj atacatorului
    }

     

    in final public-ul arata asa 

    public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
    {
    	if(AdminDuty[damagedid] == 1)
        {
    		new Float:plx, Float:ply, Float:plz;
    	 	GetPlayerPos(playerid, plx, ply, plz);
    	 	SetPlayerPos(playerid, plx, ply, plz+3);
    	 	new Float:playerHealth = 0;
         	GetPlayerHealth ( playerid, playerHealth );
         	SetPlayerHealth(playerid, ( playerHealth - 20 ) );
         	SendClientMessage(playerid, COLOR_LIGHTBLUE, "Acest player este On-Duty");
         	SendClientMessage(playerid, 0xFFFFFFFF, "Ti-a scazut viata pentru ca ai atacat un player On-Duty!");
      	}
        return 1;
    }

     

  2. Spre exemplu la realchat ca sa scrie cu rosu doar daca esti tu , uite 

           new nume[64];
            GetPlayerName(playerid, nume, sizeof(nume));
            if((strcmp(nume, "Yamato", true) == 0))
            {
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "{FF0000}%s: {FFFFFF}%s", sendername, text);
                ProxDetector(20.0, playerid,                          string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
            }

     

    In loc de Yamato pui numele tau , iar ca sa vezi chestia aia cu rcon login uite asta 

     

    public OnRconLoginAttempt(ip[], password[], success)
    {
        if(!success)
        {
            new string[128],sendername[25];
            format(string, sizeof(string), "Player with IP %s has typed a wrong server password: %s.", ip, password);
            ABroadCast(0xFF0000FF, string, 6);
            new pip[16];
            foreach(Player,i)
            {
                GetPlayerIp(i, pip, sizeof(pip));
                if(!strcmp(ip, pip, true) && PlayerInfo[pAdmin] < 6)
                {
                    SendClientMessage(i, 0xFFFFFFFF, "{FF0000}AdmBot{FFFFFF}: Wrong Password. Banned!");
                    GetPlayerName(i, sendername, sizeof(sendername));
                    format(string, sizeof(string), "AdmCmd: %s was banned by AdmBot, reason: Wrong RCON Password", sendername);
                    SendClientMessageToAll(COLOR_LIGHTRED, string);
                    KickEx(i);
                }
            }
        }
        return 1;
    }

     

    sau asta 

     

    public OnRconLoginAttempt(ip[], password[], success)
    {
        if(!success)
        {
            new pip[16];
            new string[176];
            new giveplayerid;
            for(new i = 0; i <= MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    GetPlayerIp(i, pip, sizeof(pip));
                    if(!strcmp(ip, pip, true))
                    {
                        new sendername[MAX_PLAYER_NAME];
                        GetPlayerName(i, sendername, sizeof(sendername));
                        if(LogingAttempts!= 5)
                        {
                            format(string, sizeof(string),"[RCON]: %s (%d) tried to login at RCON and Failed!",sendername,i);
                            ABroadCast(COLOR_LIGHTRED,string,1);
                            LogingAttempts ++;
                        }
                        else
                        {
                            format(string, sizeof(string), "LOCALHOST: Banning player '%s'. Reason: Too many Failed Logins at RCON", sendername);
                            Ban(giveplayerid);
                        }
                    }
                }
            }
        }
        else
        {
            new pip[16];
            new string[176];
            for(new i = 0; i <= MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    GetPlayerIp(i, pip, sizeof(pip));
                    if(!strcmp(ip, pip, true))
                    {
                        new sendername[MAX_PLAYER_NAME];
                        GetPlayerName(i, sendername, sizeof(sendername));
                        format(string, sizeof(string),"[RCON]: %s (%d) tried to login at RCON and Succesed!",sendername,i);
                        ABroadCast(COLOR_LIGHTRED,string,1);
                    }
                }
            }
        }
        return 1;
    }

  3. Salutare samp romania. am si eu o intrebare , si anume , cum pot face ca in momentul cand dau buy la o masina sa nu mi se spawneze una peste alta sa fie una langa alta , locatiile sa le pun eu la dispozitie , cand se termina , sa inceapa sa se puna iar din primul loc , si tot asa .

    Tin sa precizez ca am facut ds-ul lui maurice 

  4. 19 hours ago, mrtea said:

    Ce pluginuri ai in folderul plugins?

    fix asta e 

    GameMode PlayNion.rar

     

    EDIT: acu da alte prostii 

    Quote

     

    ----------
    Loaded log file: "server_log.txt".
    ----------

    SA-MP Dedicated Server
    ----------------------
    v0.3.7-R2, (C)2005-2015 SA-MP Team

    filterscripts = ""  (string)

    Server Plugins
    --------------
     Loading plugin: crashdetect
      CrashDetect v4.15.1 is OK.
      Loaded.
     Loading plugin: sscanf


     ===============================

          sscanf plugin loaded.

             Version:  2.8.1

       (c) 2012 Alex "Y_Less" Cole

     ===============================

      Loaded.
     Loading plugin: streamer


    *** Streamer Plugin v2.7.7 by Incognito loaded ***

      Loaded.
     Loading plugin: mysql
     >> plugin.mysql: R39-2 successfully loaded.
      Loaded.
     Loading plugin: wp

     ==================

      Whirlpool loaded

     ==================

      Loaded.
     Loaded 5 plugins.


    Started server on port: 7777, with maxplayers: 10 lanmode is OFF.


    Filterscripts
    ---------------
      Loaded 0 filterscripts.

    TextDraw-uri incarcate
    [debug] Run time error 4: "Array index out of bounds"
    [debug]  Accessing element at index 5 past array upper bound 4
    [debug] AMX backtrace:
    [debug] #0 00069b54 in public LoadBizz () from gf.amx
    [debug] #1 0006b5f4 in public SSCANF_OnGameModeInit () from gf.amx
    [debug] #2 000021b8 in public Itter_OnGameModeInit () from gf.amx
    [debug] #3 native CallLocalFunction () from samp-server.exe
    [debug] #4 00001568 in public ScriptInit_OnGameModeInit () from gf.amx
    [debug] #5 00000d74 in public OnGameModeInit () from gf.amx


     PLAYNION RPG SERVER
    _____________________
     by: ArthuR & ARTIST

    Number of vehicle models: 0
    [MySQL ERROR]: errorid: '1054' | error: 'Unknown column 'Status' in 'where clause'' | callback: '' | query: 'UPDATE `users` SET `Status` = '0' WHERE `Status` = '1'' | cmysql_db: '1'

     

     

  5. echo Executing Server Config...
    lanmode 0
    rcon_password 1234
    maxplayers 10
    port 7777
    rcon 0
    hostname FUN-TESTE
    gamemode0 gf 1	
    plugins crashdetect sscanf streamer mysql wp
    filterscripts 
    profile_gamemode 1
    profile_format html
    announce 0
    query 1
    weburl www.funreborn.ro/forum
    onfoot_rate 40
    incar_rate 40
    weapon_rate 40
    stream_distance 300.0
    stream_rate 1000
    maxnpc 10

    asta e server.cfg , gm-ul este playnion din colectia aia 

  6. am o ciudata problema la gamemode-urile cu database ,adica , imi apare la samp-server.exe : 

     

    SA-MP Dedicated Server
    ----------------------
    v0.3.7, (C)2005-2015 SA-MP Team
    
    [13:07:46] password = ""  (string)
    [13:07:46] filterscripts = ""  (string)
    [13:07:46] 
    [13:07:46] Server Plugins
    [13:07:46] --------------
    [13:07:46]  Loading plugin: mysql
    [13:07:46]   Failed.
    [13:07:46]  Loading plugin: sscanf
    [13:07:46] 
    
    [13:07:46]  ===============================
    
    [13:07:46]       sscanf plugin loaded.     
    
    [13:07:46]          Version:  2.8.1        
    
    [13:07:46]    (c) 2012 Alex "Y_Less" Cole  
    
    [13:07:46]  ===============================
    
    [13:07:46]   Loaded.
    [13:07:46]  Loading plugin: streamer
    [13:07:46]   Failed.
    [13:07:46]  Loading plugin: Whirlpool
    [13:07:46]   Failed.
    [13:07:46]  Loading plugin: GeoIP_Plugin
    [13:07:46] Error loading GeoIP_Plugin.
    [13:07:46]   Failed.
    [13:07:46]  Loading plugin: nativechecker
    [13:07:46]   Loaded.
    [13:07:46]  Loading plugin: crashdetect
    [13:07:46]   Failed.
    [13:07:46]  Loaded 2 plugins.
    
    [13:07:46] 
    [13:07:46] Filterscripts
    [13:07:46] ---------------
    [13:07:46]   Loaded 0 filterscripts.
    
    [13:07:46]    Error: Function not registered: 'mysql_connect'
    [13:07:46]    Error: Function not registered: 'mysql_tquery'
    [13:07:46]    Error: Function not registered: 'CreateDynamicObject'
    [13:07:46]    Error: Function not registered: 'DestroyDynamicObject'
    [13:07:46]    Error: Function not registered: 'cache_get_data'
    [13:07:46]    Error: Function not registered: 'cache_get_field_content'
    [13:07:46]    Error: Function not registered: 'MoveDynamicObject'
    [13:07:46]    Error: Function not registered: 'DestroyDynamicPickup'
    [13:07:46]    Error: Function not registered: 'CreateDynamicPickup'
    [13:07:46]    Error: Function not registered: 'cache_get_row'
    [13:07:46]    Error: Function not registered: 'CreateDynamic3DTextLabel'
    [13:07:46]    Error: Function not registered: 'DestroyDynamic3DTextLabel'
    [13:07:46]    Error: Function not registered: 'mysql_close'
    [13:07:46] Script[gamemodes/gamemode.amx]: Run time error 19: "File or function is not found"
    [13:07:46] Number of vehicle models: 0

     

    am avut si la gamemode-urile normale , dar am rezolvat .

    Tin sa precizez ca am incercat toate metodele de rezolvare a acestei erori , si doar la gamemode-urile normale a mers

  7. 20 minutes ago, Geani said:

    incearca asa       

            if(PlayerInfo[killerid][pInDM] == 1 && IsDM == 1)// aici aveai spatiu liber
            {
                PlayerInfo[killerid][pdmKills]++;
            }
            if(PlayerInfo[killerid][pInDM] == 1)
            {
                format(string, sizeof(string), "{CCFFCC}You killed {FF6699}%d {CCFFCC}enemies.", PlayerInfo[killerid][pdmKills]);
                SendClientMessage(killerid,0xFFD700AA, string);
            }

    la fel face 

  8. //==============================================================================
    	   if(PlayerInfo[killerid][pInDM] == 1 && IsDM == 1)
    	    {
    	        PlayerInfo[killerid][pdmKills]++;
    	    }
            if(PlayerInfo[killerid][pInDM] == 1)
    	    {
    		    format(string, sizeof(string), "{CCFFCC}You killed {FF6699}%d {CCFFCC}enemies.", PlayerInfo[killerid][pdmKills]);
    		    SendClientMessage(killerid,0xFFD700AA, string);
    	    }
    //==============================================================================

    asta e ultimu script facut , oare e ceva la asta ? si am bagat include-uri dar nu si in gm .. nu imi dau seama de la ce 

  9. D:\samp server\Server bun GFZONE\gamemodes\gf.pwn(123) : warning 201: redefinition of constant/macro (symbol "GetPlayerMoney")
    D:\samp server\Server bun GFZONE\gamemodes\gf.pwn(124) : warning 201: redefinition of constant/macro (symbol "ResetPlayerMoney")
    D:\samp server\Server bun GFZONE\gamemodes\gf.pwn(125) : warning 201: redefinition of constant/macro (symbol "GivePlayerMoney")
    D:\samp server\Server bun GFZONE\gamemodes\gf.pwn(126) : warning 201: redefinition of constant/macro (symbol "PutPlayerInVehicle")
    D:\samp server\Server bun GFZONE\gamemodes\gf.pwn(127) : warning 201: redefinition of constant/macro (symbol "GivePlayerWeapon")
    D:\samp server\Server bun GFZONE\gamemodes\gf.pwn(128) : warning 201: redefinition of constant/macro (symbol "SetPlayerPos")
    D:\samp server\Server bun GFZONE\gamemodes\gf.pwn(129) : warning 201: redefinition of constant/macro (symbol "SetVehiclePos")
    D:\samp server\Server bun GFZONE\gamemodes\gf.pwn(2414) : error 017: undefined symbol "JB_GivePlayerMoney"
    D:\samp server\Server bun GFZONE\gamemodes\gf.pwn(2443) : error 017: undefined symbol "JB_GivePlayerMoney"
    D:\samp server\Server bun GFZONE\gamemodes\gf.pwn(2480) : error 017: undefined symbol "JB_GivePlayerWeapon"
    D:\samp server\Server bun GFZONE\gamemodes\gf.pwn(2509) : error 017: undefined symbol "JB_SetPlayerPos"
    D:\samp server\Server bun GFZONE\gamemodes\gf.pwn(2901) : error 017: undefined symbol "JB_SetPlayerPos"
    D:\samp server\Server bun GFZONE\gamemodes\gf.pwn(2932) : error 017: undefined symbol "JB_SetPlayerPos"
    D:\samp server\Server bun GFZONE\gamemodes\gf.pwn(2956) : error 017: undefined symbol "JB_SetPlayerPos"
    D:\samp server\Server bun GFZONE\gamemodes\gf.pwn(2995) : error 017: undefined symbol "JB_SetPlayerPos"
    D:\samp server\Server bun GFZONE\gamemodes\gf.pwn(3008) : error 017: undefined symbol "JB_SetPlayerPos"
    D:\samp server\Server bun GFZONE\gamemodes\gf.pwn(3021) : error 017: undefined symbol "JB_SetPlayerPos"
    D:\samp server\Server bun GFZONE\gamemodes\gf.pwn(3047) : error 017: undefined symbol "JB_SetPlayerPos"
    D:\samp server\Server bun GFZONE\gamemodes\gf.pwn(3060) : error 017: undefined symbol "JB_SetPlayerPos"
    D:\samp server\Server bun GFZONE\gamemodes\gf.pwn(3086) : error 017: undefined symbol "JB_SetPlayerPos"
    D:\samp server\Server bun GFZONE\gamemodes\gf.pwn(3125) : error 017: undefined symbol "JB_SetPlayerPos"
    D:\samp server\Server bun GFZONE\gamemodes\gf.pwn(3190) : error 017: undefined symbol "JB_SetPlayerPos"
    D:\samp server\Server bun GFZONE\gamemodes\gf.pwn(3203) : error 017: undefined symbol "JB_SetPlayerPos"
    D:\samp server\Server bun GFZONE\gamemodes\gf.pwn(3216) : error 017: undefined symbol "JB_SetPlayerPos"
    D:\samp server\Server bun GFZONE\gamemodes\gf.pwn(3268) : error 017: undefined symbol "JB_SetPlayerPos"
    D:\samp server\Server bun GFZONE\gamemodes\gf.pwn(3281) : error 017: undefined symbol "JB_SetPlayerPos"
    D:\samp server\Server bun GFZONE\gamemodes\gf.pwn(3294) : error 017: undefined symbol "JB_SetPlayerPos"
    D:\samp server\Server bun GFZONE\gamemodes\gf.pwn(3320) : error 017: undefined symbol "JB_SetPlayerPos"
    D:\samp server\Server bun GFZONE\gamemodes\gf.pwn(3333) : error 017: undefined symbol "JB_SetPlayerPos"
    D:\samp server\Server bun GFZONE\gamemodes\gf.pwn(3346) : error 017: undefined symbol "JB_SetPlayerPos"
    D:\samp server\Server bun GFZONE\gamemodes\gf.pwn(3385) : error 017: undefined symbol "JB_SetPlayerPos"
    D:\samp server\Server bun GFZONE\gamemodes\gf.pwn(3398) : error 017: undefined symbol "JB_SetPlayerPos"
    D:\samp server\Server bun GFZONE\gamemodes\gf.pwn(3437) : error 017: undefined symbol "JB_SetPlayerPos"
    
    Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase

    am facut un sistem , brusc nu imi mai citeste includurile , am bagat un backup cu ele si acu imi da asta , ce o fi ? ca pana acum 10 minute a mers perfect fara aceste erori ?

     

  10. 1 minute ago, DanielMayson said:

    Asa trebuie sa fie

    new sirena; si vezi ca daca ai o masina infcop baga pentru inceput infcop[0] dar la new infcop[1];

    sirena = CreateObject(19620,-2597.0762,-2638.4270,-5.3536,0.0000, 0.0000, 0.0000);
    AttachObjectToVehicle(sirena, infcop[1], 0.000000, 0.000000, 0.739999, 0.000000, 0.000000, 0.000000); //Object Model: 19620 |

    nu te-am inteles cu infcop , la ce te referi 

  11. de la ce oare apar erorile astea ? 

       Erori :
    
    error 008: must be a constant expression; assumed zero
    error 032: array index out of bounds (variable "infcop")
      
      Randurile : 
    
        new infcop[1] = AddStaticVehicle(411,1541.9409,-1634.3010,13.2775,89.4380,0,0); //
        new sirena = CreateObject(19420, 0, 0, 0, 0, 0, 0);
        AttachObjectToVehicle(sirena, infcop[1], 0.000000, 0.000000, 0.869999, 0.000000, 0.000000, 0.000000); //Object Model: 19620

    Am urmat tutorilaul acesta : 

     

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