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