Jump to content

Recommended Posts

Posted

Salutare tuturor :P

Azi m-am gandit sa fac un tut BuyVip

Uitati comanda buyvip pe DCMD:

Pentru a functiona corect adaugati unde aveti includeurile :

http://www.solidfiles.com/d/29b0aa68e078be8bb677fd4a7cfd7c76/

dcmd_buyvip(playerid,params[]) //Adaugati oriunde in GameMode 
{
#pragma unused params
ShowPlayerDialog(playerid,bvip,DIALOG_STYLE_LIST,"BuyVip","{FFFFFF}Level 1 {FFAF00} --> {FF0000} 20 Ore\n{FFFFFF}Level 2 {FFAF00} --> {FF0000} 40 Ore\n{FFFFFF}Level 3 {FFAF00} --> {FF0000}60 Ore","Select","Cancel);
return 1;
}[/pawn]

[pawn]public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if (dialogid == bvip)
{
if(response)
{
if(listitem == 0)
{
if AccInfo[playerid][hours] >= 20) //Orele care trebuie sa le aiba playerul 
{
AccInfo[playerid][pVip] = 1; //Levelul la VIP
AccInfo[playerid][hours] -= 20;
}
else
{
SendClienMessage(playerid,green,"Nu ai destule ore pentru a cumpara VIP !"); //Mesajul daca nu are ore destule 
}
}
if(listitem == 1)
{
if AccInfo[playerid][hours] >= 40) //Orele pentru a cumpara VIP
{
AccInfo[playerid][pVip] = 2; //Levelul de VIP
AccInfo[playerid][hours] -= 40; 
}
else
{
SendClienMessage(playerid,green,"Nu ai destule ore pentru a cumpara VIP !"); //Mesajul daca nu are ore suficiente
}
}
if (listitem == 2)
{
if AccInfo[playerid][hours] >= 60) //Orele care trebuiesc pentru a cumpara VIP
{
AccInfo[playerid][pVip] = 3; //Levelul VIP
AccInfo[playerid][hours] = 60;
}
else
{
SendClienMessage(playerid,green,"Nu ai destule ore pentru a cumpara VIP !"); //Mesajul daca nu are destule ore
}
}
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(buyvip,6,cmdtext);
return 1;
}
Uitati comanda buyvip pe ZCMD: Pentru a functiona corect adaugati unde aveti includeurile :
#include < zcmd >
ZCMD BY ZEEX http://forum.sa-mp.com/showthread.php?t=91354
CMD:buyvip(playerid,params[]) //Adaugati oriunde in GameMode 
{
ShowPlayerDialog(playerid,bvip,DIALOG_STYLE_LIST,"BuyVip","{FFFFFF}Level 1 {FFAF00} --> {FF0000} 20 Ore\n{FFFFFF}Level 2 {FFAF00} --> {FF0000} 40 Ore\n{FFFFFF}Level 3 {FFAF00} --> {FF0000}60 Ore","Select","Cancel);
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if (dialogid == bvip)
{
if(response)
{
if(listitem == 0)
{
if AccInfo[playerid][hours] >= 20) //Orele care trebuie sa le aiba playerul
{
AccInfo[playerid][pVip] = 1; //Levelul care il primeste
AccInfo[playerid][hours] -= 20; 
}
else
{
SendClienMessage(playerid,green,"Nu ai destule ore pentru a cumpara VIP !"); //Mesajul daca nu are destule ore 
}
}
if(listitem == 1)
{
if AccInfo[playerid][hours] >= 40) //Orele pentru a cumpara vip
{
AccInfo[playerid][pVip] = 2; //Levelul care il primeste
AccInfo[playerid][hours] -= 40;
}
else
{
SendClienMessage(playerid,green,"Nu ai destule ore pentru a cumpara VIP !"); //Mesajul care il primeste cand nu are destule ore
}
}
if (listitem == 2)
{
if AccInfo[playerid][hours] >= 60) //Orele care ii trebuiesc pentru a cumpara vip
{
AccInfo[playerid][pVip] = 3; //Levelul care il primeste
AccInfo[playerid][hours] = 60;
}
else
{
SendClienMessage(playerid,green,"Nu ai destule ore pentru a cumpara VIP !"); //Mesajul daca nu are destule ore
}
}
}
return 1;
}
Atentie ! Acest BuyVip l-am facut in LuxAdmin :P ! ! Pentru a functiona in alte sisteme de admin cum ar fi Ladmin4v2 lasati un Reply si va voi ajuta ( Doar pentru cei care nu se pricep ) ! ! Pentru a functiona in Ladmin4v2 By Lethal folositi :
PlayerInfo[playerid][hours]
PlayerInfo[playerid][Vip]
Acesta a fost Tutorialul ! Va multumesc pentru timpul acordat! Aceasta metoda de a face comanda buyvip este cea mai usoara ! Puteam sa o fac mai complicata dar am zis sa inteleaga tot Romanul :P
idiots.png
  • 2 months later...
Posted

facepalm.

Asta numesti tu tutorial ?.

Asta este o pierdere de timp.

Puteai macar sa folosesti pentru coduri [ code ] [ /code ] si sa explici fiecare functie ...

communitylogosml.png

94.23.120.101:7778

Posted

chiar aveam nevoie de un un buy vip bravo 5/5

<a href="http://www.game-state.eu/188.212.105.161:7777/"><img src="http://www.game-state.eu/188.212.105.161:7777/430x73_FFFFFF_FF9900_000000_000000.png" alt="www.Game-State.eu" style="border-style: none;" /></a>

  • 2 weeks later...

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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.