Jump to content

Recommended Posts

Posted (edited)

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

Posted

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

  • Upvote 1
Posted
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

  • 6 months later...
Posted

Avand in vedere ca sunt incepator in limbajul pawno si stiu doar sa dau SendClientMessage imi este de foarte mare ajutor :) +1

  • 1 month later...
Posted
On 4/19/2017 at 10:57 PM, aMis342 said:

Unde sa bag astea ca nu stiu 

Cauti  in gamemodul tau o comanda anume gen /factions si dupa ea adaugi comanda !

  • 3 months later...
Posted
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

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.