Jump to content

GTA SAMP Vie niekto spravit ? BANKA SYSTEM


Recommended Posts

Našel jsem na samp foru z roku 2015 v pwn tak kdybys chtěl pošlu a ty si to můžeš kdyžtak přeložit do češtiny  kdyby ti to stačilo takhle  

Link to comment
Share on other sites

před 2 hodinami, [email protected] said:

Vedel by mi niekto spravit že na volaký prikaz vytvorím banku ktora bude fungovat ?

Myslím že jo, zkusím to...
// Jop tak bych věděl:

Spoiler

public OnPlayerCommandText(..) {
    if (!strcmp("/banka" ...) {
        for (new i = 0; i < MAX_BANKS; i++) {
            if (IsPlayerInRangeOfPoint(...)) return ShowPlayerDialog(playerid, DIALOG_BANKA);
            else return SendClientMessage(...);
        }
        return true;
    }
    return false;
}

public OnDialogResponse(...) {
    if (dialogid == DIALOG_BANKA) {
        switch (listitem) {
            case 0: {
                //vybrat
                GivePlayerMoney(playerid, money); 
                Banka[playerid] = Banka[playerid] - strval(inputtext);
                return true;
            }
            case 1: {
                //vložit
                GivePlayerMoney(playerid, -money); 
                Banka[playerid] = Banka[playerid] + strval(inputtext);
                return true;
            }
        }
        return true;
    }
    return false;
}

 

 

 

Edited by Scydo
Link to comment
Share on other sites

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