Jump to content

Bankomat


Guest MiNNo

Recommended Posts

Takže si ukážeme jak na bankomat :

 

 

Hore do modu :

 

new bankk; //Banka
new bank[MAX_PLAYERS];
new neco;

 

OngamemodeInit :

 

//-------------------bank-------------------------
CreateObject(1977,2194.911,1993.555,11.295,0.0,0.0,-90.000);//Vytvori bankomat v LS,mozte zmenit suradnice  //-------------------bank------------------
bankk = CreatePickup(1274,1,2193.6909,1993.6216,12.2969);//vytvori pickup

 

 

OnPlayerPickUpPickUp

 

//Banka
if(pickupid == neco)
  {

SetPlayerInterior(playerid,3);
SetPlayerPos(playerid,-23.4095,-55.3713,1003.5469); //Suradnice pred bankomatom,kde sa nachadza pickup
  }

 

  //----------------bank-----------------
  if(pickupid == bankk) //Co sa stane ked vojdete do pickupu
  {
  SendClientMessage(playerid, COLOR_WHITE, "[ ! ] Pre vloženie peňazí napíšte /vloz částka .");
  SendClientMessage(playerid, COLOR_WHITE, "[ ! ] Pre vybranie peňazí napíšte /vyber částka .");
  }

 

Vo(lne v mode ja ´to mam pod typmi mam Onplayer Selected menu row ptm public tip a pod tym mamtoto

 

//Banka
dcmd_vloz(playerid,params[]) {
new castka = strval(params[0]);
if(!params[0])return SendClientMessage(playerid, COLOR_WHITE, "Použitie: /vloz [čiastka]");
new string[256];
new string2[256];
if(IsPlayerConnected(playerid)){
if (IsPlayerInSphere(playerid,2193.6909,1993.6216,12.2969,5) == 1){
new sendermoney = GetPlayerMoney(playerid);
if(castka <= sendermoney){
if(castka > 0){
bank[playerid] +=castka;
GivePlayerMoney(playerid,-castka);
SetPlayerInterior(playerid,0);
format(string, sizeof(string), "V poriadku si uložil %d$ na svoj účet.", castka);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string2, sizeof(string), "Aktuálny stav konta je : %d$", bank[playerid]);
SendClientMessage(playerid, COLOR_WHITE, string2);
}else{
SendClientMessage(playerid, COLOR_RED, "Chybná čiastka!");
}}else{
SendClientMessage(playerid, COLOR_RED, "Nemáš tolko penazý na tento vklad!");
}}else{
SendClientMessage(playerid, COLOR_RED, "Nejsi v banke!");
}}
return true;
}

dcmd_vyber(playerid,params[]) {
new castka = strval(params[0]);
if(!params[0])return SendClientMessage(playerid, COLOR_WHITE, "Použitie: /vyber [čiastka]");
new string[256];
new string2[256];
if(IsPlayerConnected(playerid)){
SetPlayerInterior(playerid,0);
if (IsPlayerInSphere(playerid,2193.6909,1993.6216,12.2969,5) == 1){
if(castka <= bank[playerid]){
if(castka > 0){
bank[playerid] -=castka;
GivePlayerMoney(playerid,castka);
format(string, sizeof(string), "V poriadku si vybral %d$ zo svojho účtu peniaze .", castka);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string2, sizeof(string), "Aktuálny stav konta je : %d$", bank[playerid]);
SendClientMessage(playerid, COLOR_WHITE, string2);
}else{
SendClientMessage(playerid, COLOR_RED, "Chybná čiastka !");
}}else{
SendClientMessage(playerid, COLOR_RED, "Nemáš tolko penazý na tento výber !");
}}else{
SendClientMessage(playerid, COLOR_RED, "Niesi v banke !");
}}
return true;
}

 

Ak nejaké chyby napíšte.

 

Tutorial by [tShC]sMRt4k_xP] Súradnice,pickupy úprava a popis MiNNo

Link to comment
Share on other sites

  • Replies 55
  • Created
  • Last Reply

Top Posters In This Topic

  • 1 year later...

Ahoj já ji zkoušel a píše mi to:

C:\Documents and Settings\Administrator\Plocha\pawno+server\gamemodes\nt1.0.pwn(759) : 
warning 203: symbol is never used: "dcmd_vloz"
C:\Documents and Settings\Administrator\Plocha\pawno+server\gamemodes\nt1.0.pwn(759) : 
warning 203: symbol is never used: "dcmd_vyber"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


3 Warnings.

 

Kdyžtak mi poraďte jsem nováček .. :-)

Link to comment
Share on other sites

Ahoj já ji zkoušel a píše mi to:

C:\Documents and Settings\Administrator\Plocha\pawno+server\gamemodes\nt1.0.pwn(759) : 
warning 203: symbol is never used: "dcmd_vloz"
C:\Documents and Settings\Administrator\Plocha\pawno+server\gamemodes\nt1.0.pwn(759) : 
warning 203: symbol is never used: "dcmd_vyber"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


3 Warnings.

 

Kdyžtak mi poraďte jsem nováček .. :-)

Skus to nechat - sou to jen warningy

Link to comment
Share on other sites

Ahoj já ji zkoušel a píše mi to:

C:\Documents and Settings\Administrator\Plocha\pawno+server\gamemodes\nt1.0.pwn(759) : 
warning 203: symbol is never used: "dcmd_vloz"
C:\Documents and Settings\Administrator\Plocha\pawno+server\gamemodes\nt1.0.pwn(759) : 
warning 203: symbol is never used: "dcmd_vyber"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


3 Warnings.

 

Kdyžtak mi poraďte jsem nováček .. :-)

Skus to nechat - sou to jen warningy

 

No hele nejdou prikazy ..... jo a napsal jsem ti pm ... tak se koukni jestli ti to prislo ..

Link to comment
Share on other sites

este aby ti sly prikazy kdyz je tam nemas...

 

Jsem novacek ... Co bych tam mel pridat ?

Pridal jsem tam

#pragma unused dcmd_vloz
#pragma unused dcmd_vyber

(rada)

 

Ale ted mi to pise

C:\Documents and Settings\Administrator\Plocha\pawno+server\gamemodes\nt1.0.pwn(716) : error 017: undefined symbol "IsPlayerInSphere"
C:\Documents and Settings\Administrator\Plocha\pawno+server\gamemodes\nt1.0.pwn(744) : error 017: undefined symbol "IsPlayerInSphere"

Link to comment
Share on other sites

Guest [BJ]boban88

hmm pretoze si dal pragma unused params mas v prikaze params a ty ich vypnes tak sa potom necuduj ze ti to nejde vymaz to pragma unused params v tych prikazoch a napis co ti to pise

Link to comment
Share on other sites

C:\Documents and Settings\Administrator\Plocha\pawno+server\gamemodes\nt1.0.pwn(759) : warning 203: symbol is never used: "dcmd_vloz"
C:\Documents and Settings\Administrator\Plocha\pawno+server\gamemodes\nt1.0.pwn(759) : warning 203: symbol is never used: "dcmd_vyber"

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