Jump to content

RuSke

Membru
  • Posts

    14
  • Joined

  • Last visited

    Never

Posts posted by RuSke

  1. Am gm indungi si am vrut sal compilez pe samp 0.3d si imi dai eroare asta:

    C:\DOCUME~1\BogdaneL\MYDOCU~1\DESCRC~1\INDUNG~1\GAMEMO~1\Indungi.pwn(9) : fatal error 100: cannot read from file: "Dini"

    Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

    1 Error.

    LINIA: 

    #include <a_samp>

    #include <file>

    #include <Dini>

    #include <mxINI>

    #include <anticheat>//

    #include <streamer>//

    #include <md5>

    #include <utils>

    #include <core>

    #include <float>

    #include <morphinc>

  2. -Din acest tutorial veti avea arme la spawn oricarre factiune doriti

    Dati search(CTRL+F) la:

    if (PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)//Triads spawn

    {

    SetPlayerToTeamColor(playerid);

    SetPlayerFacingAngle(playerid, 180);

    SetPlayerInterior(playerid,0);

    SetPlayerPos(playerid,-2200.8950,646.8164,49.4375);

    PlayerInfo[playerid][pInt] = 0;

    return 1;

    }

    http://wiki.sa-mp.com/wiki/Weapons De aici puteti lua id armelor

    Dupa care va iesi:

    if (PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)//Triads spawn

    {

    SetPlayerToTeamColor(playerid);

    SetPlayerFacingAngle(playerid, 180);

    SetPlayerInterior(playerid,0);

    SetPlayerPos(playerid,-2200.8950,646.8164,49.4375);

                            GivePlayerWeapon(playerid, 24, 100);

    GivePlayerWeapon(playerid, 26, 100);

    PlayerInfo[playerid][pInt] = 0;

    return 1;

    }

    Sub linia SetPlayerPos(playerid, 1102.7017,-299.0774,73.9922); adaugati GivePlayerWeapon(playerid, 26[iD arme], 100[ glaonte]);

    PS: Eu doar am facut exemplu factiunei Triads voi puteti face la orice factiune

  3. In acest tutorial va voi arata cum sa adaugam helperi pe server.

    In primul rand la functiile definite prin

    forward

    si adaugam acolo

    forward SendHelperMessage(color, string[]);

    Apoi mergem la

    enum pInfo

    si sub

    pAdmin,

    adaugam

    pHelper,

    dupa sub

    PlayerInfo[playerid][pAdmin] = 0;

    adaugam

    PlayerInfo[playerid][pHelper] = 0;

    apoi la OnPlayerRegister, sub

    format(var, 32, "AdminLevel=%d\n",PlayerInfo[playerid][pAdmin]);fwrite(hFile, var);

    adaugam

    format(var, 32, "HelperLevel=%d\n",PlayerInfo[playerid][pHelper]);fwrite(hFile, var);
    apoi la OnPlayerUpdate, sub
    format(var, 32, "AdminLevel=%d\n",PlayerInfo[playerid][pAdmin]);fwrite(hFile, var);
    adaugam
    format(var, 32, "HelperLevel=%d\n",PlayerInfo[playerid][pHelper]);fwrite(hFile, var);
    acum sub
    if( strcmp( key , "AdminLevel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAdmin] = strval( val ); }
    Mergem la si definim prin
    forward

    functia

    HBroadCast(color,const string[])

    apoi la functiile definite prin

    define

    scriem:

    #define SCM SendClientMessage

    acum, la functiile definite prin

    public

    public HBroadCast(color,const string[])

    {

            for(new i = 0; i < MAX_PLAYERS; i++)

            {

                    if(IsPlayerConnected(i))

                    {

                            if (PlayerInfo[pHelper] != 0)

                            {

                                    SCM(i, color, string);

                                    printf("%s", string);

                            }

                    }

            }

            return 1;

    }

    Dupa care sub asta definim

    SendHelperMessage

    si scriem tot la public-uri

    public SendHelperMessage(color, string[])

    {

            for(new i = 0; i < MAX_PLAYERS; i++)

            {

                    if(IsPlayerConnected(i))

                    {

                            if(PlayerInfo[pHelper] >= 1)

                            {

                                    SendClientMessage(i, color, string);

                            }

                    }

            }

    }

    Apoi facem comenzile, mergem la

    OnPlayerCommandText

    si sub o comanda adaugam

    //------------------------------------------[Helper]-------------------------------------------------------------

            if(strcmp(cmd, "/hc", true) == 0 || strcmp(cmd, "/hchat", true) == 0)

            {

                    if(IsPlayerConnected(playerid))

                    {

                            GetPlayerName(playerid, sendername, sizeof(sendername));

                            new length = strlen(cmdtext);

                            while ((idx < length) && (cmdtext[idx] <= ' '))

                            {

                                    idx++;

                            }

                            new offset = idx;

                            new result[64];

                            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))

                            {

                                    result[idx - offset] = cmdtext[idx];

                                    idx++;

                            }

                            result[idx - offset] = EOS;

                            if(!strlen(result))

                            {

                                    SendClientMessage(playerid, COLOR_YELLOW2, "USAGE: (/hchat) [chat]");

                                    return 1;

                            }

                            format(string, sizeof(string), "Chat - [Helper] %s : %s **", sendername, result);

                            if (PlayerInfo[playerid][pHelper] >= 1)

                            {

                                    SendHelperMessage(COLOR_YELLOW2, string);

                            }

                    }

                    return 1;

            }

            if(strcmp(cmd, "/hsay", true) == 0)

            {

                    if(IsPlayerConnected(playerid))

                    {

                            if (PlayerInfo[playerid][pHelper] >= 1)

                            {

                                    GetPlayerName(playerid, sendername, sizeof(sendername));

                                    new length = strlen(cmdtext);

                                    while ((idx < length) && (cmdtext[idx] <= ' '))

                                    {

                                            idx++;

                                    }

                                    new offset = idx;

                                    new result[64];

                                    while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))

                                    {

                                            result[idx - offset] = cmdtext[idx];

                                            idx++;

                                    }

                                    result[idx - offset] = EOS;

                                    if(!strlen(result))

                                    {

                                            SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /hsay [text]");

                                            return 1;

                                    }

                                    format(string, sizeof(string), "[Helper %s: %s]",sendername,result);

                                    for(new i = 0; i < MAX_PLAYERS; i++)

                                    {

                                            if(IsPlayerConnected(i))

                                            {

                                                    SendClientMessage(i,COLOR_YELLOW2, string);

                                            }

                                    }

                                    return 1;

                            }

                            else

                            {

                                    SendClientMessage(playerid, COLOR_GRAD1, "  you are not authorized to use that command!");

                                    return 1;

                            }

                    }

                    return 1;

            }

                    if(strcmp(cmd, "/setint", true) == 0)

            {

                    if(IsPlayerConnected(playerid))

                    {

                            tmp = strtok(cmdtext, idx);

                            if(!strlen(tmp))

                            {

                                    SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /setint [interiorid]");

                                    return 1;

                            }

                            new intid;

                            intid = strval(tmp);

                            if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pHelper] >= 1)

                            {

                                    SetPlayerInterior(playerid,intid);

                                    PlayerInfo[playerid][pInt] = intid;

                                    format(string, sizeof(string), "  interiorid %d.", intid);

                                    SendClientMessage(playerid, COLOR_GRAD1, string);

                            }

                            else

                            {

                                    SendClientMessage(playerid, COLOR_GRAD1, "  You are not authorized to use that command !");

                            }

                    }

                    return 1;

            }

                    if(strcmp(cmd, "/makehelper", true) == 0)

            {

                    if(IsPlayerConnected(playerid))

                    {

                            tmp = strtok(cmdtext, idx);

                            if(!strlen(tmp))

                            {

                                    SCM(playerid, COLOR_GRAD2, "USAGE: /makehelper [playerid/PartOfName] [1-4]");

                                    return 1;

                            }

                            new para1;

                            new level;

                            para1 = ReturnUser(tmp);

                            tmp = strtok(cmdtext, idx);

                            level = strval(tmp);

                            if (PlayerInfo[playerid][pAdmin] >= 1337 || PlayerInfo[playerid][pHelper] >= 4)

                            {

                                    if(IsPlayerConnected(para1))

                                    {

                                            if(para1 != INVALID_PLAYER_ID)

                                            {

                                                    GetPlayerName(para1, giveplayer, sizeof(giveplayer));

                                                    GetPlayerName(playerid, sendername, sizeof(sendername));

                                                    PlayerInfo[para1][pHelper] = level;

                                                    printf("News: %s has promoted %s to a level %d helper.", sendername, giveplayer, level);

                                                    format(string, sizeof(string), "  You have been promoted to a level %d helper by %s", level, sendername);

                                                    SCM(para1, COLOR_LIGHTBLUE, string);

                                                    format(string, sizeof(string), "  You have promoted %s to a level %d helper.", giveplayer,level);

                                                    SCM(playerid, COLOR_LIGHTBLUE, string);

                                                    format(string, 256, "News: %s has set %s to a level %d helper.", sendername,giveplayer,level);

                                                    ABroadCast(COLOR_YELLOW,string,1);

                                            }

                                    }

                            }

                            else

                            {

                                    SCM(playerid, COLOR_GRAD1, "  you are not authorized to use that command!");

                            }

                    }

                    return 1;

            }

                    if (strcmp(cmd, "/helpers", true) == 0)

              {

                    new counth = 0;

                    SCM(playerid, 0xCCD802AA, "[____________Helpers Online___________]");

                    for(new i = 0; i < MAX_PLAYERS; i++)

                    {

                            if (IsPlayerConnected(i))

                            {

                                    if(PlayerInfo[pHelper] == 1)

                                    {

                                            GetPlayerName(i, sendername, sizeof(sendername));

                                            format(string, 256, "Helper Level 1 : %s ", sendername);

                                            SCM(playerid,0xCAFF70AA, string);

                                            counth++;

                                    }

                                                            if(PlayerInfo[pHelper] == 2)

                                    {

                                            GetPlayerName(i, sendername, sizeof(sendername));

                                            format(string, 256, "Helper Level 2 : %s ", sendername);

                                            SCM(playerid,0x1E90FFAA, string);

                                            counth++;

                                    }

                                                            if(PlayerInfo[pHelper] == 3)

                                    {

                                            GetPlayerName(i, sendername, sizeof(sendername));

                                            format(string, 256, "Helper Level 3 : %s ", sendername);

                                            SCM(playerid,0xFFDEADAA, string);

                                            counth++;

                                    }

                            }

                    }

                    if (counth == 0)

                    SCM(playerid,COLOR_LIGHTRED,"No Helpers online on the server");

                    SCM(playerid,0xCCD802AA, "[____________________________________]");

                    return 1;

              }

              if(strcmp(cmd, "/hhelp", true) == 0 || strcmp(cmd, "/hh", true) == 0)

            {

                    if(IsPlayerConnected(playerid))

                    {

                            SendClientMessage(playerid, 0x33CCFFAA,"|___________________________________________[Helper Commands]_____________________________________|");

                            if (PlayerInfo[playerid][pHelper] >= 1)

                            {

                                    SendClientMessage(playerid, COLOR_GREEN, "[Helper Level 1] /respawn /check /setint /mute /goto /cc (nu abuzati) /slap /hc  ( helper chat )");

                            }

                            if (PlayerInfo[playerid][pHelper] >= 2)

                            {

                                    SendClientMessage(playerid, COLOR_LIGHTRED,"[Helper Level 2] /gotosf /gotols /gotog /gotom /hsay ");

                            }

                            if (PlayerInfo[playerid][pHelper] >= 3)

                            {

                                    SendClientMessage(playerid, COLOR_YELLOW2,"[Helper Level 3] /gethere /agl ");

                            }

                            if (PlayerInfo[playerid][pHelper] >= 4)

                            {

                                    SendClientMessage(playerid, COLOR_LIGHTBLUE,"[Helper Level 4] /makehelper ");

                            }

                            SendClientMessage(playerid, 0x33CCFFAA,"|__________________________________________[Helper Commands]________________________________________|");

                    }

                    return 1;

            }

                    if(strcmp(cmd, "/needhelp", true) == 0)

            {

                    if(IsPlayerConnected(playerid))

                    {

                            if(PlayerInfo[playerid][pHMuted] == 1)

                            {

                                    SendClientMessage(playerid, TEAM_CYAN_COLOR, "  You can't speak, you have been silenced !");

                                    return 1;

                            }

                            GetPlayerName(playerid, sendername, sizeof(sendername));

                            new length = strlen(cmdtext);

                            while ((idx < length) && (cmdtext[idx] <= ' '))

                            {

                                    idx++;

                            }

                            new offset = idx;

                            new result[64];

                            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))

                            {

                                    result[idx - offset] = cmdtext[idx];

                                    idx++;

                            }

                            result[idx - offset] = EOS;

                            if(!strlen(result))

                            {

                                    SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /needhelp [text]");

                                    return 1;

                            }

                            format(string, sizeof(string), "Help requested from %s : %s", sendername, (result));

                            HBroadCast(COLOR_YELLOW,string);

                            SendClientMessage(playerid, COLOR_YELLOW, "Your help request has been sent, please wait for a answer.");

                    }

                    return 1;

            }

    Acum cautam comanda

    /goto

    si o schimbam cu

    if(strcmp(cmd, "/goto", true) == 0)

            {

                    if(IsPlayerConnected(playerid))

                    {

                            tmp = strtok(cmdtext, idx);

                            if(!strlen(tmp))

                            {

                                    SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /goto [playerid/PartOfName]");

                                    return 1;

                            }

                            new Float:plocx,Float:plocy,Float:plocz;

                            new plo;

                            plo = ReturnUser(tmp);

                            if (IsPlayerConnected(plo))

                            {

                                    if(plo != INVALID_PLAYER_ID)

                                    {

                                            if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pHelper] >= 1)

                                            {

                                                    if(Spectate[playerid] != 255)

                                                    {

                                                            Spectate[playerid] = 256;

                                                    }

                                                    GetPlayerPos(plo, plocx, plocy, plocz);

                                                    if(PlayerInfo[plo][pInt] > 0)

                                                    {

                                                            SetPlayerInterior(playerid,PlayerInfo[plo][pInt]);

                                                            PlayerInfo[playerid][pInt] = PlayerInfo[plo][pInt];

                                                            PlayerInfo[playerid][pLocal] = PlayerInfo[plo][pLocal];

                                                    }

                                                    if(PlayerInfo[playerid][pInt] == 0)

                                                    {

                                                            SetPlayerInterior(playerid,0);

                                                    }

                                                    if(plocz > 530.0 && PlayerInfo[plo][pInt] == 0) //the highest land point in sa = 526.8

                                                    {

                                                            SetPlayerInterior(playerid,1);

                                                            PlayerInfo[playerid][pInt] = 1;

                                                    }

                                                    if (GetPlayerState(playerid) == 2)

                                                    {

                                                            new tmpcar = GetPlayerVehicleID(playerid);

                                                            SetVehiclePos(tmpcar, plocx, plocy+4, plocz);

                                                            TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;

                                                    }

                                                    else

                                                    {

                                                            SetPlayerPos(playerid,plocx,plocy+2, plocz);

                                                    }

                                                    SendClientMessage(playerid, COLOR_GRAD1, "  You have been teleported");

                                            }

                                            else

                                            {

                                                    SendClientMessage(playerid, COLOR_GRAD1, "  you are not authorized to use that command!");

                                            }

                                    }

                            }

                            else

                            {

                                    format(string, sizeof(string), " That player is not connected.", plo);

                                    SendClientMessage(playerid, COLOR_GRAD1, string);

                            }

                    }

                    return 1;

            }

    ACEST TUTORIAL ESTE FACUT DE MINE SI UN PRIETEN.

    Si asta a fost tot, sper sa va fie de folos, daca intampinati probleme postati aici.

  4. Cum pot schimba spawnul la civili daca am in gm asa:

    else

    {

    SetPlayerToTeamColor(playerid);

    if(PlayerInfo[playerid][pOrigin] == 1)//LS

    {

    SetPlayerPos(playerid,1744.4681,-1862.5240,13.5762);

    SetPlayerFacingAngle(playerid, 46.8583);

    SetPlayerInterior(playerid,0);

    PlayerInfo[playerid][pInt] = 0;

    }

    Si vreau sa pun cu  AddPlayerClass(288,937.8102,-1717.9170,13.5469,96.8105,0,0,0,0,0,0); // ,

    Cum fac ?

  5.                     FS.Radarv1.0

    Descriere:Acest Fs este facut pentru sv RP adica la cei care merg cu viteza mai mare decat 80km/h.Sunt 11 radare puse in orasul LS.

    Cum il Instalati:Ca sa il instalati faceti asta:

    -downloadati fisierulil puneti in filterscripts apoi deschideti server.cfg si scrie numele FS in linia filterscripts numele si apoi luati fisierul scriptfiles si il puneti in scriptfiles

    Poze

    samp003nny.png

    Creditele sunt ale lui Teddy

    Download: <removed>

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