Ds-Lan Romania
Ne-am mutat pe :http://onegame.ro
Server de triburile: http://tw.onegame.ro
Ne-am mutat pe :http://onegame.ro
Server de triburile: http://tw.onegame.ro
Ne-am mutat pe :http://onegame.ro
Server de triburile: http://tw.onegame.ro

[Tutorial] /buylicense

In jos

  [Tutorial] /buylicense

Mesaj Scris de Vizitato la data de Dum Aug 08, 2010 3:52 am

Prima data facem un PickUp , cautam linia AddStaticPickup si adaugam linia , acest pickup se afla in City Hall



Cod:
AddStaticPickup(1239, 23, 362.5067,173.6162,1008.3828); //BuyLicense


Dupaia cautam "//Buyable Drugs for Drug Dealers" si adaugam asta :



Cod:
else if (PlayerToPoint(3, i,362.5067,173.6162,1008.3828))
            {
            GameTextForPlayer(i, "~r~~h~ Cumpara o licenta ~n~~w~Scrie /buylicense", 5000, 5);
            }



Iar acuma adaugam comanda





Cod:

  if(strcmp(cmd, "/buylicense", true) == 0)
    {
        if (PlayerToPoint(3, playerid,361.8299,173.7075,1008.3828))
        {
            SendClientMessage(playerid, COLOR_LIGHTRED,"____|Lista|____");
            SendClientMessage(playerid, COLOR_LIGHTRED,"_Licente_");
            SendClientMessage(playerid, COLOR_YELLOW,"/Driving ($1500) ");
            SendClientMessage(playerid, COLOR_YELLOW,"/Flying ($10000)");
            SendClientMessage(playerid, COLOR_YELLOW,"/Sailing ($500)");
            SendClientMessage(playerid, COLOR_YELLOW,"/Fishing ($250)");
            SendClientMessage(playerid, COLOR_YELLOW,"/Weapon ($25000)");
            SendClientMessage(playerid, COLOR_LIGHTRED,"Sa nu uiti sa iti verifici licentele /licenses");
            SendClientMessage(playerid, COLOR_LIGHTRED,"______________");
        }
        else
        {

            SendClientMessage(playerid, COLOR_YELLOW,"Nu esti in Primarie/City Hall.");

        }
        return 1;
    }
    if(strcmp(cmd, "/driving", true) == 0)
    {
        if (PlayerToPoint(3, playerid,361.8299,173.7075,1008.3828))
        {
            SendClientMessage(playerid, COLOR_LIGHTRED,"____|Info|____");
            SendClientMessage(playerid, COLOR_YELLOW,"Ati cumparat un permis de conducere.");
            SendClientMessage(playerid, COLOR_YELLOW,"Acesta a costat $1500.");
            SendClientMessage(playerid, COLOR_LIGHTRED,"_____________");
            GivePlayerMoney(playerid,-1500);
            PlayerInfo[playerid][pCarLic] = 1;
            PlayerInfo[playerid][pCarLic] = 1;
          }
          return 1;
    }
    if(strcmp(cmd, "/flying", true) == 0)
    {
        if (PlayerToPoint(3, playerid,361.8299,173.7075,1008.3828))
        {
            SendClientMessage(playerid, COLOR_LIGHTRED,"____|Info|____");
            SendClientMessage(playerid, COLOR_YELLOW,"Ati cumparat o licenta de pilotat.");
            SendClientMessage(playerid, COLOR_YELLOW,"Acesta a costat $10000.");
            SendClientMessage(playerid, COLOR_LIGHTRED,"_____________");
            GivePlayerMoney(playerid,-10000);
            PlayerInfo[playerid][pFlyLic] = 1;
            PlayerInfo[playerid][pFlyLic] = 1;


        }
        return 1;
    }
    if(strcmp(cmd, "/sailing", true) == 0)
    {
        if (PlayerToPoint(3, playerid,361.8299,173.7075,1008.3828))
        {
            SendClientMessage(playerid, COLOR_LIGHTRED,"____|Info|____");
            SendClientMessage(playerid, COLOR_YELLOW,"Ati cumparat o licenta de mers cu barca.");
            SendClientMessage(playerid, COLOR_YELLOW,"Aceasta a costat $500");
            SendClientMessage(playerid, COLOR_LIGHTRED,"_____________");
            GivePlayerMoney(playerid,-500);
            PlayerInfo[playerid][pBoatLic] = 1;
            PlayerInfo[playerid][pBoatLic] = 1;


        }
        return 1;
    }
    if(strcmp(cmd, "/fishing", true) == 0)
    {
        if (PlayerToPoint(3, playerid,361.8299,173.7075,1008.3828))
        {
            SendClientMessage(playerid, COLOR_LIGHTRED,"____|Info|____");
            SendClientMessage(playerid, COLOR_YELLOW,"Ati cumparat o licenta de pescuit.");
            SendClientMessage(playerid, COLOR_YELLOW,"Aceasta a costat $250.");
            SendClientMessage(playerid, COLOR_LIGHTRED,"_____________");
            GivePlayerMoney(playerid,-250);
            PlayerInfo[playerid][pFishLic] = 1;
            PlayerInfo[playerid][pFishLic] = 1;


        }
        return 1;
    }
    if(strcmp(cmd, "/weapon", true) == 0)
    {
        if (PlayerToPoint(3, playerid,361.8299,173.7075,1008.3828))
        {
            SendClientMessage(playerid, COLOR_LIGHTRED,"____|Info|____");
            SendClientMessage(playerid, COLOR_YELLOW,"Ati cumparat o licenta de port-arma");
            SendClientMessage(playerid, COLOR_YELLOW,"Aceasta a costat $25000.");
            SendClientMessage(playerid, COLOR_LIGHTRED,"_____________");
            GivePlayerMoney(playerid,-25000);
            PlayerInfo[playerid][pGunLic] = 1;
            PlayerInfo[playerid][pGunLic] = 1;


        }
        return 1;
    }

Acest tutorial este pentru oamenii care nu au in GameMod factiune School Instructors / Licenses Faction.

Vizitato
Vizitator


Sus In jos

Sus

- Subiecte similare

 
Permisiunile acestui forum:
Nu puteti raspunde la subiectele acestui forum