Jump to content

Buy Vip


[Funky]Anakin

Recommended Posts

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
Link to comment
Share on other sites

  • 2 months later...
  • 2 weeks later...

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.