Jump to content
  • 0

Question

2 answers to this question

Recommended Posts

Posted

Pei ca sa faci un pickup te duci pe server dai /save unde vrei sa fie banca unde sa scoti banii iei coordonatele si le pui in gamemode

EX:

 

else if (PlayerToPoint(3, i,2314.7786,-8.1858,26.7422) || PlayerToPoint(3, i,-477.7068,-202.2913,985.3784))

{

    GameTextForPlayer(i, "~w~~h~Comenzile Bancii~n~~r~~h~/withdraw /deposit /transfer~n~~r~~h~/balance", 5000, 5);

}

Scripting for $$ .

CONTACT: [email protected] .

Posted

Nu nu merge asa,uite aici ai comanda /bancomat dar mai intai vei merge la addmapicon si mergi langa atm-ul acela.Dai /save atm1 (in caz ca sunt mai multe faci aceasi treaba) asa mergi in My Documents>>Gta San Andreas User Filles>>SA-MP>>savepoints sau ceva de genul.Il deschizi si o sa iti apara AddPlayerClass(x,y,z,0 00000 00 00)//atm1

Copiezi dupa prima virgula coordonatele x,y,z, si mergi la setplayermapicon si vei vedea ca sunt mai multe.Police Bank etc...Dai Copy unde scrie Banca si dai paste tot acolo doar ca mai jos...Sti la ce ma refer.Schimbi coordonatele cu alea de la atm si ai pick-upul.Acuma pui comanda /bancomat *cea care va extrage banii din cont*

[pawn]if(strcmp(cmd, "/bancomat", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

        if(!IsPlayerInRangeOfPoint(playerid, 3,X,Y,Z,) && !IsPlayerInRangeOfPoint(playerid, 3,X,Y,Z,) && !IsPlayerInRangeOfPoint(playerid, 3, X,Y,Z,))//UNDE X,Y,Z, sunt coordonatele!

        {

            SendClientMessage(playerid, COLOR_GREY, "  Nu esti la un bancomat!");

            return 1;

        }

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD2, "Foloseste: /bancomat [suma]");

format(string, sizeof(string), "  Ai $%d in contul tau.", PlayerInfo[playerid][pAccount]);

SendClientMessage(playerid, COLOR_GRAD3, string);

return 1;

}

new cashdeposit = strval(tmp);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD2, "Foloseste: /bancomat [suma]");

format(string, sizeof(string), "  Ai $%d in contul tau.", PlayerInfo[playerid][pAccount]);

SendClientMessage(playerid, COLOR_GRAD3, string);

return 1;

}

if (cashdeposit > PlayerInfo[playerid][pAccount] || cashdeposit < 1)

{

SendClientMessage(playerid, COLOR_GRAD2, "  Nu ai atatia bani !");

return 1;

}

if (cashdeposit > 10000)

{

SendClientMessage(playerid, COLOR_GRAD2, "  Poti extrage sume pana la $10000!");

return 1;

}

    ConsumingMoney[playerid] = 1;

SafeGivePlayerMoney(playerid,cashdeposit);

PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit;

format(string, sizeof(string), "  Ai extras din contul tau: $%d  ", cashdeposit,PlayerInfo[playerid][pAccount]);

SendClientMessage(playerid, COLOR_YELLOW, string);

                GetPlayerName(playerid, giveplayer, sizeof(giveplayer));

new y, m, d;

new h,mi,s;

getdate(y,m,d);

gettime(h,mi,s);

format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /bancomat ($%d)",d,m,y,h,mi,s,sendername, cashdeposit);

PayLog(string);

return 1;

}

return 1;

}[/pawn]

 

 

Guest
This topic is now closed to further replies.
×
×
  • 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.