Jump to content

Tutorial Comanda /Bonus


Uzzi25

Recommended Posts

Salut astazi va prezint un tutorial pentru comanda /bonus(ofera unui nou jucator level,bani etc.)

Comanda + Tutorial:

if(strcmp(cmd, "/bonus", true) == 0)


    {
        if(IsPlayerConnected(playerid))
        {
              if(PlayerInfo[playerid][pLevel] == 1)
            {
                PlayerInfo[playerid][pLevel] += 2; 
                SetPlayerCash(playerid, 2000000);
                SendClientMessage(playerid,COLOR_LIGHTGREEN,"{FFA500}==================={FF0000} [{E0FFFF}Bonus{FF0000}] {FFA500}===================");
                SendClientMessage(playerid,COLOR_LIGHTGREEN,"{CCDEE0}Ai primit {00FA1D}3 LevelUP");
                SendClientMessage(playerid,COLOR_LIGHTGREEN,"{CCDEE0}Ai primit {FFA500}2.000.000{00FA1D}$$ ");
                SendClientMessage(playerid,COLOR_LIGHTRED,"Daca doresti sa-ti iei o masian gratis {CE3D57}(/dealership)");
                SendClientMessage(playerid,COLOR_LIGHTGREEN,"Daca vrei sa-ti iei un job tasteaza {CE3D57}/job !");
                SendClientMessage(playerid,COLOR_LIGHTBLUE,"Nu uita sa citesti cateva dintre regulile serverului {CE3D57}/reguli !");
                SendClientMessage(playerid,COLOR_LIGHTGREEN,"{FFA500}==================={FF0000} [{E0FFFF}Bonus{FF0000}] {FFA500}===================");
            }
            else
            {
            SendClientMessage(playerid, COLOR_GREY, " You can`t use this command at this time [Level 1] !");

            }
        }
        return 1;
    }

Acum sa explicam ce contine comanda:

 if(PlayerInfo[playerid][pLevel] == 1) = Doar jucatori de Level 1 Pot folosi aceasta comanda 

PlayerInfo[playerid][pLevel] += 2;  = Daruieste Playeruli 2 Level Up (Se poate Modifica dupa bunul plac)

SetPlayerCash(playerid, 2000000); = Seteaza Playerului care a folosit comanda 2000000 cash (Se poate Modifica dupa bunul plac)

   SendClientMessage(playerid,COLOR_LIGHTGREEN,"{CCDEE0}Ai primit {00FA1D}3 LevelUP"); = Trimite playerului care a folosit comanda un mesaj text ca a primit 3 Level Up (Exista mai multe mesaje text le modificati voi )

SendClientMessage(playerid, COLOR_GREY, " You can`t use this command at this time [Level 1] !"); = Primeste un mesaj ca decat cei care au Level 1 Pot Folosi comanda /Bonus

Multumesc ca ai citit acest topic .

Sper ca te-am ajutat .

 

Daca exista grejeli va rog sa ma sucuzati este primul tutorial de genul .

O zi Buna

Edited by Uzzi25
  • Sad 1
  • Upvote 2

2c4AJX1.png

Link to comment
Share on other sites

Acum 6 ore, TedyYy. a spus:

Mie nu mi-au placut niciodata comenzile , /bonus /cadou , trebuie sa munceasca ei pentru level sau bani , Dar oricum imi place tutorialul tau . 

Multumesc

2c4AJX1.png

Link to comment
Share on other sites

  • 6 months later...
  • 1 month later...
  • 3 months later...
La 21.07.2016 la 21:26, Uzzi25 a spus:

Salut astazi va prezint un tutorial pentru comanda /bonus(ofera unui nou jucator level,bani etc.)

Comanda + Tutorial:

if(strcmp(cmd, "/bonus", true) == 0)


    {
        if(IsPlayerConnected(playerid))
        {
              if(PlayerInfo[playerid][pLevel] == 1)
            {
                PlayerInfo[playerid][pLevel] += 2; 
                SetPlayerCash(playerid, 2000000);
                SendClientMessage(playerid,COLOR_LIGHTGREEN,"{FFA500}==================={FF0000} [{E0FFFF}Bonus{FF0000}] {FFA500}===================");
                SendClientMessage(playerid,COLOR_LIGHTGREEN,"{CCDEE0}Ai primit {00FA1D}3 LevelUP");
                SendClientMessage(playerid,COLOR_LIGHTGREEN,"{CCDEE0}Ai primit {FFA500}2.000.000{00FA1D}$$ ");
                SendClientMessage(playerid,COLOR_LIGHTRED,"Daca doresti sa-ti iei o masian gratis {CE3D57}(/dealership)");
                SendClientMessage(playerid,COLOR_LIGHTGREEN,"Daca vrei sa-ti iei un job tasteaza {CE3D57}/job !");
                SendClientMessage(playerid,COLOR_LIGHTBLUE,"Nu uita sa citesti cateva dintre regulile serverului {CE3D57}/reguli !");
                SendClientMessage(playerid,COLOR_LIGHTGREEN,"{FFA500}==================={FF0000} [{E0FFFF}Bonus{FF0000}] {FFA500}===================");
            }
            else
            {
            SendClientMessage(playerid, COLOR_GREY, " You can`t use this command at this time [Level 1] !");

            }
        }
        return 1;
    }

Acum sa explicam ce contine comanda:

 if(PlayerInfo[playerid][pLevel] == 1) = Doar jucatori de Level 1 Pot folosi aceasta comanda 

PlayerInfo[playerid][pLevel] += 2;  = Daruieste Playeruli 2 Level Up (Se poate Modifica dupa bunul plac)

SetPlayerCash(playerid, 2000000); = Seteaza Playerului care a folosit comanda 2000000 cash (Se poate Modifica dupa bunul plac)

   SendClientMessage(playerid,COLOR_LIGHTGREEN,"{CCDEE0}Ai primit {00FA1D}3 LevelUP"); = Trimite playerului care a folosit comanda un mesaj text ca a primit 3 Level Up (Exista mai multe mesaje text le modificati voi )

SendClientMessage(playerid, COLOR_GREY, " You can`t use this command at this time [Level 1] !"); = Primeste un mesaj ca decat cei care au Level 1 Pot Folosi comanda /Bonus

Multumesc ca ai citit acest topic .

Sper ca te-am ajutat .

 

Daca exista grejeli va rog sa ma sucuzati este primul tutorial de genul .

O zi Buna

este mai util sa il faci in varianta cum lam facut eu in ShowPlayerDialog

if(strcmp(cmd, "/bonus", true) == 0)


    {
        if(IsPlayerConnected(playerid))
        {
              if(PlayerInfo[playerid][pLevel] == 1)
            {
                PlayerInfo[playerid][pLevel] += 2; 
                SetPlayerCash(playerid, 2000000);
				ShowPlayerDialog(playerid, 3354, DIALOG_STYLE_MSGBOX, "{ffffff}Server Bonus ", "{ffffff}Ai folosit comanda {00FFFF}/bonus{ffffff} si ai primit:\n {CCDEE0}Ai primit {00FA1D}3 LevelUP\n - {CCDEE0}Ai primit {FFA500}2.000.000{00FA1D}$$\n {00FFFF}- Daca doresti sa-ti iei o masian gratis {CE3D57}(/dealership)\n - Daca vrei sa-ti iei un job tasteaza {CE3D57}/job ! \n Nu uita sa citesti cateva dintre regulile serverului {CE3D57}/reguli !","{ffffff}Multumesc","");
            }
            else
            {
            SendClientMessage(playerid, COLOR_GREY, " You can`t use this command at this time [Level 1] !");

            }
        }
        return 1;
    }

 

FiveGame  Lands

Pawno Developer, Mapping , Scripter

Since 2016

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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