Jump to content
  • 0

Problema la un FS cu masini


Guest Scofield

Question

Guest Scofield

Uite link: http://forum.sa-mp.com/index.php?topic=92658.0

Deci ori is praf eu ori nush ce draq are nu merge deloc /newbuycar ...

Acu merge ...

Cum fac sa adaug /lock /unlock ?

Si daca se poate baga fs in gm :)

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Se poate baga FS-ul in GM. Cu putina atentie vei reusi.

Uite comenzile:

    if (strcmp(cmdtext, "/lock", true)==0)

{

        if(IsPlayerInAnyVehicle(playerid))

        {

                new State=GetPlayerState(playerid);

                if(State!=PLAYER_STATE_DRIVER)

                {

                        SendClientMessage(playerid,COLOR_ORANGE,"Trebuie Sa Ai Un Vehicul Al Tau Ca Sa Folosesti Comanda.");

                        return 1;

                }

                new i;

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

                {

                        if(i != playerid)

                        {

                                SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 1);

                        }

                }

                SendClientMessage(playerid, COLOR_ORANGE, "Vehicul Blocat!");

                new Float:pX, Float:pY, Float:pZ;

                GetPlayerPos(playerid,pX,pY,pZ);

                PlayerPlaySound(playerid,1056,pX,pY,pZ);

        }

        else

        {

        SendClientMessage(playerid, COLOR_ORANGE, "Nu Esti Intr-un Vehicul!");

        }

        return 1;

}

        if (strcmp(cmdtext, "/unlock", true)==0)

{

        if(IsPlayerInAnyVehicle(playerid))

        {

                new State=GetPlayerState(playerid);

                if(State!=PLAYER_STATE_DRIVER)

                {

                        SendClientMessage(playerid,COLOR_RED,"Trebuie Sa Ai Un Vehicul Al Tau Ca Sa Folosesti Comanda.");

                        return 1;

                }

                new i;

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

                {

                        SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 0);

                }

                SendClientMessage(playerid, COLOR_ORANGE, "Vehicul Deblocat!");

                new Float:pX, Float:pY, Float:pZ;

                GetPlayerPos(playerid,pX,pY,pZ);

                PlayerPlaySound(playerid,1057,pX,pY,pZ);

        }

        else

        {

        SendClientMessage(playerid, COLOR_ORANGE, "Nu Esti Intr-un Vehicul!");

        }

        return 1;

}

logo.png

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

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Similar Content

    • By CenzoR
      Salut! Am problema cand intru in masina persoanala nu imi arata detalile acesteia, de ex cate zile are, km, culorile.
      Scriptul este deja pus in gamemode (nu este anulat)
      Ma poate ajuta cineva?
    • By TheGodfather
      Salut, masinile se respawneaza la un interval de timp daca cineva nu e in ele. Am pus peste tot unde e SetVehicleToRespawn() un mesaj unic, ca sa imi dau seama unde e problema. Dar cand masina se respawneaza nu apare niciun mesaj, tin sa mentionez ca mesajul e pus cu SendClientMessageToAll. Deci nu exista sansa sa se fi trimis si sa nu il fi vazut. Am gamemode hpq123 bhood.
    • By Lwka
      Hey! Am si eu nevoie de ajutor la comanda /bonus


      Cum pot acorda un vehicul temporar?
    • By St3f4n36
      Cum as putea fac urmatoarea chestie:
      Daca intr-un dialog imi apare ca primeste x bani daca apasa cazul 1 ( banii formati cu new money = 100 + rand(100); )
      si dupa sa imi trimita un mesaj tot cu aceasi suma de bani x. Trebuie salvata intr-o variabila sau cum?
    • By FlobertRO
      Buna , am si eu o problema . Mi-se restarteaza serverulul random . In server_log am gasit asta : 
      Stie cineva ce pot face  Va rog ❤️ . Multumesc frumos
       
       
      [23:17:26] [join] rezana has joined the server (1:---------------------) [23:17:26] [debug] Run time error 4: "Array index out of bounds" [23:17:26] [debug] Accessing element at index 1 past array upper bound 0 [23:17:26] [debug] AMX backtrace: [23:17:26] [debug] #0 00200b24 in ?? (... <1 argument>) at GM.pwn:8108 [23:17:26] [debug] #1 000aef80 in public MP_OPC (playerid=1) at C:\Users\xda\Desktop\gamemode-impact\gamemode-rpg-impact\pawno\include\YSI\y_hooks/impl.inc:633 [23:17:26] [debug] #2 native CallLocalFunction () from samp03svr [23:17:26] [debug] #3 0000c77c in public SSCANF_OnPlayerConnect (playerid=1) at C:\Users\xda\Desktop\gamemode-impact\gamemode-rpg-impact\pawno\include\mSelection.inc:432 [23:17:26] [debug] #4 00003210 in public Itter_OnPlayerConnect (playerid=1) at C:\Users\xda\Desktop\gamemode-impact\gamemode-rpg-impact\pawno\include\sscanf2.inc:236 [23:17:26] [debug] #5 00001684 in public OnPlayerConnect (playerid=1) at C:\Users\Florin\Dxda\gamemode-impact\gamemode-rpg-impact\pawno\include\YSI\y_iterate.inc:646
  • Recently Browsing   0 members

    No registered users viewing this page.

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