Jump to content

IcE.

Membru
  • Posts

    1,094
  • Joined

  • Last visited

Posts posted by IcE.

  1. Cauta linia OnPlayerEnterVehicle si dedesupt adauga asta :

    [pawn] if(IsAnOwnableCar(vehicleid) && CarInfo[vehicleid][cLock] == 1 && CarInfo[vehicleid][cOwned] == 1)

    {

        if(PlayerInfo[playerid][pAdmin] >= 5) { }

        else

        {

    new Float:cx, Float:cy, Float:cz;

    GetPlayerPos(playerid, cx, cy, cz);

    SetPlayerPos(playerid, cx, cy, cz);

    }

    }[/pawn]

    La OnPlayerConnect adaugi:

    [pawn]

    for(new h = 371; h < sizeof(CarInfo); h++)//371 inlocui cu id-u de la prima masina!

    {

    SetVehicleParamsForPlayer(h,playerid,0,CarInfo[h][cLock]);

    }[/pawn]

  2. Cine pute? :|

    [pawn]

    public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)

    {

    new carmodel;

    carmodel = GetVehicleModel(vehicleid);

    if(carmodel == 425 || carmodel == 432)

    {

    if(PlayerInfo[playerid][pAdmin] >= 2) { }//modifici tu adminlevel cu cat vrei!

    else

      {

    RemovePlayerFromVehicle(playerid);

    TogglePlayerControllable(playerid, true);

    SendClientMessage(playerid,-1,"[server-Rules] - Nai voie daca nu esti admin!");

    }

    }

    return 1;

    }

    [/pawn]

    Nu se cer scripuri.

  3. [pawn]

    format(coordsstring, sizeof(coordsstring), "Ai %s"DecimalPoint(playerid));

    SendClientMessage(playerid, 0x7979FFFF,coordsstring);

    stock DecimalPoint(playerid)

    {

        new str[30];

        new cash=GetPlayerMoney(playerid);

        if(cash >= 0)

        {

            format(str, sizeof(str), "$%d", cash);

            if(1000 <= cash < 10000) strins(str, ".", 2, sizeof(str));

            else if(10000 <= cash < 100000) strins(str, ".", 3, sizeof(str));

            else if(100000 <= cash < 1000000) strins(str, ".", 4, sizeof(str));

            else if(1000000 <= cash < 10000000) { strins(str, ".", 2, sizeof(str)); strins(str, ".", 6, sizeof(str)); }

            else if(10000000 <= cash < 100000000) { strins(str, ".", 3, sizeof(str)); strins(str, ".", 7, sizeof(str)); }

            else if(100000000 <= cash < 1000000000) { strins(str, ".", 4, sizeof(str)); strins(str, ".", 8, sizeof(str)); }

            else if(cash >= 1000000000) { strins(str, ".", 2, sizeof(str)); strins(str, ".", 6, sizeof(str)); strins(str, ".", 10, sizeof(str)); }

        }

        else

        {

            format(str, sizeof(str), "-$%d", cash-(cash*2));

            if(-1000 >= cash > -10000) strins(str, ".", 3, sizeof(str));

            else if(-10000 >= cash > -100000) strins(str, ".", 4, sizeof(str));

            else if(-100000 >= cash > -1000000) strins(str, ".", 5, sizeof(str));

            else if(-1000000 >= cash > -10000000) { strins(str, ".", 3, sizeof(str)); strins(str, ".", 7, sizeof(str)); }

            else if(-10000000 >= cash > -100000000) { strins(str, ".", 4, sizeof(str)); strins(str, ".", 8, sizeof(str)); }

            else if(-100000000 >= cash > -1000000000) { strins(str, ".", 5, sizeof(str)); strins(str, ".", 9, sizeof(str)); }

            else if(cash <= -1000000000) { strins(str, ".", 3, sizeof(str)); strins(str, ".", 7, sizeof(str)); strins(str, ".", 11, sizeof(str));}

        }

        return str;

    }

    [/pawn]

  4. [pawn]if(PlayerDate[playerid][pAdmin] >= 1)

    {

    new messagetext[128];

    format(messagetext, 128, "Admin{7FFF00}(ID:%d):{FFFFFF} %s", playerid, text);

    SendPlayerMessageToAll(playerid, messagetext);

    }

    else if(PlayerDate[playerid][pVip] >= 1)

    {

    new messagetext[128];

    format(messagetext, 128, "VIP{7FFF00}(ID:%d):{FFFFFF} %s", playerid, text);

    SendPlayerMessageToAll(playerid, messagetext);

    }

    else

    {

    new messagetext[128];

    format(messagetext, 128, "{7FFF00}(ID:%d):{FFFFFF} %s", playerid, text);

    SendPlayerMessageToAll(playerid, messagetext);

    }[/pawn]

    Modifici tu variabile cum le ai tu in sistem.

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