Jump to content
Autentificarea cu Google și Facebook nu mai este disponibilă. ×

Recommended Posts

  • 4 weeks later...
Posted

Aceasta sectiune nu este pentru a face comenzile la comanda cum vreti voi, aveti sa-mp.wiki , aveti o gramada, alti scripteri de acum nu avusera in 2012 cunostintele de acum si nu intrebau, "imi faci un gamemode da sa fie frumos sa-l vad", pune mana si invata daca vrei, daca nu, asta e, nu suntem obligati sa dam oricui o comanda/stock etc, o zi faina.

  • 3 years later...
Posted

CMD:set(playerid, params[])

{

    if (!IsPlayerConnected(playerid)) return 0;

 

    if (!IsPlayerAdmin(playerid))

    {

        SendClientMessage(playerid, -1, "You are not authorized to use this command.");

        return 1;

    }

 

    new targetid, attribute, value;

    if (sscanf(params, "iii", targetid, attribute, value))

    {

        if (!IsPlayerConnected(targetid))

        {

            SendClientMessage(playerid, -1, "Target player is not connected.");

            return 1;

        }

 

        switch (attribute)

        {

            case 1: // Money

                GivePlayerMoney(targetid, value);

                SendClientMessage(playerid, -1, "You've set the player's money.");

                break;

 

            case 2: // PP

                SetPlayerPP(targetid, value);

                SendClientMessage(playerid, -1, "You've set the player's PP.");

                break;

 

            case 3: // Giftpoints

                SetPlayerGiftPoints(targetid, value);

                SendClientMessage(playerid, -1, "You've set the player's Giftpoints.");

                break;

 

 

            default:

                SendClientMessage(playerid, -1, "Invalid attribute ID.");

                break;

        }

    }

    else

    {

        SendClientMessage(playerid, -1, "Usage: /set [playerid] [attribute] [value]");

    }

 

    return 1;

}

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.