Jump to content

Sistem VIP ca cel de pe BuGGed. (Nu contine /vipname).


Recommended Posts

Posted (edited)

Acesta a fost facut de mine, cel mai probabil o sa trebuiasca sa modificati variabilele in ale voastre.

Deoarece gamemode-ul meu e impartit in mai multe fisiere .inc, a trebuie sa folosesc y_hooks (YSI).

Deci, daca nu il aveti deja instalat, instalati-l. Downloadati toata libraria YSI.

Eu in loc de SendClientMessage, am functia "SS" care ma ajuta la sistemul de limbi diferite. Schimbati "SS" in SendClientMessage.

 

Daca nu vreti sa folositi Y_hooks, mutati tot ce e sub "hook X" in "public X".

Adica mutati ce e sub hook OnDialogResponse in public OnDialogResponse.

 

Link pastebin: http://pastebin.com/J4qEHaf

/*
    Credite: Shad0w (BuGGeD)
    Facut de Zooky.
*/
 
#include <YSI\y_hooks>
 
#define DIALOG_VIP_WHEELS 827
#define DIALOG_VIPCOLOR 825
 
CMD:vip(playerid, params[])
{
    if(playerVariables[playerid][pPremium] != 2) return SS(playerid, COOL_GREEN, "You must be a VIP user to use this command.", "Trebuie sa fii un membru VIP pentru a folosi aceasta comanda.");
    if(isnull(params)) return SCM(playerid, COLOR_GREY, "Usage: {FFFFFF}/vip [text]");
    format(szMessage, sizeof(szMessage), "* VIP %s: %s", GetName(playerid), params);
    submitToVIP(szMessage, COLOR_OWNER);
    return 1;
}
 
CMD:vipwheels(playerid, params[])
{
    if(!IsPlayerInAnyVehicle(playerid)) return SS(playerid, COOL_GREEN, "You must be in your owned vehicle to use this command.", "Trebuie sa te aflii intr-o masina detinuta de tine pentru a folosi aceasta comanda.");
    new vid = GetVID(GetPlayerVehicleID(playerid));
    if(vehicleVariables[vid][vVehicleOwnerID] != playerVariables[playerid][pInternalID]) return SS(playerid, COOL_GREEN, "You must be in your owned vehicle to use this command.", "Trebuie sa te aflii intr-o masina detinuta de tine pentru a folosi aceasta comanda.");
    if(vehicleVariables[vid][vPremium] == 0) return SS(playerid, COOL_GREEN, "Your vehicle must be a VIP vehicle.", "Masina ta trebuie sa fie VIP.");
    ShowPlayerDialog(playerid, DIALOG_VIP_WHEELS, DIALOG_STYLE_LIST, "VIP: Wheels", "Dollar Wheels\nOff Road\nSwitch", "Select", "Cancel");
    return 1;
}
 
CMD:vipcolor(playerid, params[])
{
    if(playerVariables[playerid][pPremium] < 2) return SCM(playerid, COOL_GREEN, "You are not a premium user.");
    ShowPlayerDialog(playerid, DIALOG_VIPCOLOR, DIALOG_STYLE_LIST, "SERVER: Vip Colors:" , "{FFD738}VIP" , "Select" , "Cancel");
    return 1;
}
 
hook OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_VIP_WHEELS)
    {
        if(response)
        {
            switch(listitem)
            {
                case 0: //Dollar
                {
                    AddVehicleComponent(GetPlayerVehicleID(playerid), 1083);
                    SS(playerid, COLOR_ADMCMD, "VIP: Wheels have been set to Dollar", "VIP: Rotile au fost setate pe Dollar");
                    PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
                }
                case 1: //Off Road
                {
                    AddVehicleComponent(GetPlayerVehicleID(playerid), 1025);
                    SS(playerid, COLOR_ADMCMD, "VIP: Wheels have been set to Off Road", "VIP: Rotile au fost setate pe Off Road");
                    PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
                }
                case 2: //Switch
                {
                    AddVehicleComponent(GetPlayerVehicleID(playerid), 1080);
                    SS(playerid, COLOR_ADMCMD, "VIP: Wheels have been set to Switch", "VIP: Rotile au fost setate pe Switch");
                    PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
                }
            }
        }
    }
    if(dialogid == DIALOG_VIPCOLOR)
    {
        if(response)
        {
            switch(listitem)
            {
                case 0:
                {
                    playerVariables[playerid][pColor] = 10;
                    SCM(playerid, COLOR_WHITE,"{FFD738}Server: {ffffff}Nick color changed! Hope you like the new color!");
                }
            }
        }
    }
    return 1;
}
 
stock submitToVIP(string[], color)
{
    for(new i; i < MAX_PLAYERS; i++)
    {
        if(playerVariables[i][pPremium] == 2) SCM(i, color, string);
    }
    return 1;
}
Edited by Alliance Zooky.
  • Upvote 3
Posted (edited)

Poate este de la mine, eventual nu am facut asa ceva. Daca de exemplu am un Infernus si vreau sa ii dau upgrade to vip. Cum ii dau? In ce ai dat tu nu scrie nimic legat de acest lucru. In rest comenzile sunt bune si te felicit. Nu am putut testa vipwheels si vipname, insa comanda /vip, este foarte bine facuta.

Edited by Roby - Big Business
Posted

Poate este de la mine, eventual nu am facut asa ceva. Daca de exemplu am un Infernus si vreau sa ii dau upgrade to vip. Cum ii dau? In ce ai dat tu nu scrie nimic legat de acest lucru. In rest comenzile sunt bune si te felicit. Nu am putut testa vipwheels si vipname, insa comanda /vip, este foarte bine facuta.

De asta am zis sa modifici variabilele. Acea parte cu upgrade e in sistemul meu de vehicule. Acum nu o sa postez tot gamemode-ul pe net. :)

Posted

 Nu e bine, are keylogger, toate citurile, nu luati, nu incurajati pirateria, jos cu Olandezii. Va cloneaza conturile, e hecăr.

  • 3 weeks later...
Posted

Barosan , îmi dă 4 erori pe aceeași linie .. 

 

mă ajuți te rog cu asta ? 

 

KjCA3jV.png

 

Mulțumesc anticipat

Tu ai PlayerInfo, inlocuieste playerVariables cu PlayerInfo si toate variabilele...

Posted

Variabila ta nu este pPremium, cred ca e pPremiumAccount si vezi ca ai undeva szMeSendClientMessagessage, verifica si inlocuieste, si defineste COLOR_GREEN.

Posted

 

 

Variabila ta nu este pPremium, cred ca e pPremiumAccount si vezi ca ai undeva szMeSendClientMessagessage, verifica si inlocuieste, si defineste COLOR_GREEN.

 

Bro , e " COOL_GREEN " și nu știu cum să o definesc ..

O pun sus la #define la culori ? sau cum ?

 

Te-am zăpăcit , știu ... 

Posted

Bro , e " COOL_GREEN " și nu știu cum să o definesc ..

O pun sus la #define la culori ? sau cum ?

 

Te-am zăpăcit , știu ... 

#define COLOR_GREEN culoare

 

la culoare pui codul de la culoarea pe care o vrei tu, poti alege dupa colorpicker.com

Posted

Eu nu stau sa-ti explic de fiecare data sa definesti culoarea :| COLOR_OWNER :|||, tocmai ce ti-am spus...

inlocuieste GetVID cu GetVehicleID si la VehicleVariables trebuie sa faci un sistem intreg de vehicule personale, deci n-are rost sa incep sa-ti zic... ca vad ca nu stii sa definesti o culoare.

Posted

 

 

Eu nu stau sa-ti explic de fiecare data sa definesti culoarea :| COLOR_OWNER :|||, tocmai ce ti-am spus... inlocuieste GetVID cu GetVehicleID si la VehicleVariables trebuie sa faci un sistem intreg de vehicule personale, deci n-are rost sa incep sa-ti zic... ca vad ca nu stii sa definesti o culoare.
 

 

Frate aia am rezolvat-o , nu ma refeream de ea , mi-ai explic deja in pm .. 

e vorba de VehicleVariables

 

JaeduOx.png

Posted

 

 

Frate aia am rezolvat-o , nu ma refeream de ea , mi-ai explic deja in pm .. 

e vorba de VehicleVariables

 

JaeduOx.png

 

vehicleVariables e la fel ca playerVariables doar ca pentru masini. Nu stiu ce variabile folosesti tu pentru masinile tale, dar pune variabila ta in loc de a mea.

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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

By using this site, you agree to our Terms of Use. 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.

moduri samp