Simple thing.
#1

Someone can teach me how to do for example thing like this: when someone have signcheck, he can accept the signcheck only at bank HQ?

I know how to take the location by the cmd /save, but dont know how to do for example the /accept signcheck only at the bank HQ.

Thanks to everyone, +rep to helpers and good week
Reply
#2

You are creating so much topics about stuff you want to know, can you not ever try something for yourself? You are kind of abusing this section
Reply
#3

Use IsPlayerInRangeOfPoint(playerid, Floats:range, Floats, Flot:y, Floats:Z/
Reply
#4

Quote:
Originally Posted by [Bios]Marcel
Посмотреть сообщение
You are creating so much topics about stuff you want to know, can you not ever try something for yourself? You are kind of abusing this section
I try before I ask, and yes if I have questions I ask, the answer get +rep soo he's help me and I am help him too.
Reply
#5

HAve fun depending on others for your whole life
Reply
#6

Quote:
Originally Posted by [Bios]Marcel
Посмотреть сообщение
indentation* #GrammarNazi
Quote:
Originally Posted by [Bios]Marcel
Посмотреть сообщение
Ryder pls ....
Quote:
Originally Posted by [Bios]Marcel
Посмотреть сообщение
I believe you quoted the wrong person
Quote:
Originally Posted by [Bios]Marcel
Посмотреть сообщение
If his script isn't bullshit, you wont be able to to do any commands without being logged in, so no need to check that

@Ryder the thing is , youa re asking for help when u shouldnt
Quote:
Originally Posted by [Bios]Marcel
Посмотреть сообщение
Quote:
Originally Posted by [Bios]Marcel
Посмотреть сообщение
You are creating so much topics about stuff you want to know, can you not ever try something for yourself? You are kind of abusing this section

You keep posting useless tripe, where your hard on people. Learn in this instance is asking you to teach him to fish, not to feed him fish. When you teach someone with pointers and don't just sick up code on their laps they tend to ask a few questions to make a few things before it clicks.

Once question however can you code? Is your code yours? Looks like I'm trying to start an argument here but I see some of your response and they're useless or offensive.

@Learn: This is actually quite complex if you wanted to make them pay at a certain location, this is because you want the checks to stay but you don't want to dump the tickets to pre-defined memory (which I what SA-MP uses) as it will simply be wasting RAM 99% of the time the players don't have checks to be cashed.

If you want an example from me I would like to see what save system you use, and if you use SSCANF as I will need to know this to provide decent help. If you don't need 100% help however in font I suggest this:

Command: Here I would do my SSCANF checks, work out the amount that's being paid to who, and take the money away from this players bank account at this point if you wanted to guarantee no abuse of the system where a player sends another player money, spends his money to put a loan or whatever on his account where his bank is in debt or where he never pays this back. I suppose you could program in an "bounce" system where checks won't always go through if the player has sent the money already.

Depositing: I would set the location as above with "IsPlayerInRangeOfPoint", this would allow me to see when they type /accept check that they are there, and not anywhere... Once you have done this load in the information from your Checks Saving system which is related to that player again I can't give an example as I don't know what systems you are using, although my overall outcome would be to display the name of the person into the dialog. Then I would make the player click this to see more information and to then accept the check and cash it.

Check Expiry, I would just check this when the player tries to deposit their check. Thus this for me would be saved in my Check System folder with the amount to be deposited and by who, don't check for this every game hour for example as it's wasted CPU time.

How I would personally save the checks: I would save them in INI files on the server, as this makes it a lot more simple, this would allow me to have a folder called "Check System", then when a player went to deposit money or received a check I would make a folder in that folder to hold their checks. Just save his checks with ID's from 0 to MAX_CHECKS.

On receipt of money I would then run a loop of MAX_CHECKS see if he can have more checks and then if he can dump it into the spare save file.

On Loading: I would use local variables, don't make these global as it will do what I'm describing to try and avoid here, for me these would like like:

pawn Код:
//Global encase used else where
enum pChecks
{
     CheckValue,
     CheckBy[MAX_PLAYER_NAME],
     CheckID
};

//local in the dialog response
new Checks[MAX_CHECKS][pChecks];
Load the information into that and then display it.

Then display a new dialog where they would input the ID of which check they wanted to act on as the format of my display would be like this:
Quote:

Check ID: 0 Amount: Ј1500 Check Issuer: BaconEggsYum

Then when they respond and press any dialog entry if you display in a list like that or they click, OK. I would display a the dialog above I just described. Then send them to the next dialog

Final DIalog: Here it would display the full information of what you've collected, such as:

Quote:

Check ID: 0
Check Value: Ј1500
Check Issued By: BaconEggsYum
Check Issue Date: 05/01/2017
Check Expiary Date: 10/01/2017

Button: Deposit Button: Back

I would load this information in the final dialog with the following declaration:
pawn Код:
new Check[pChecks];
This is because you are loading this on a singularity basis and not loading the all their checks. This does mean more CPU time loading and unloading files, but the amount the system will get used is minimal. Therefore its better to hammer the CPU a bit for a second than occupy RAM 24/7.

If you want code added to this just post what your using and I will add some examples above to help you out, and then notify you that I've added them. If your saving with MySQL, I'm not helping with the saving however as I hate MySQL without working directly with the database.
Reply
#7

Edit: This IceCube dude types too much.
Reply
#8

Quote:
Originally Posted by PhoneixViper
Посмотреть сообщение
Use IsPlayerInRangeOfPoint(playerid, Floats:range, Floats, Flot:y, Floats:Z/
thanks brother!
Reply
#9

Quote:
Originally Posted by [Bios]Marcel
Посмотреть сообщение
HAve fun depending on others for your whole life
no man, I know to do a lot of things alone ! Even if it does not look like this
Reply
#10

Quote:
Originally Posted by IceCube!
Посмотреть сообщение
You keep posting useless tripe, where your hard on people. Learn in this instance is asking you to teach him to fish, not to feed him fish. When you teach someone with pointers and don't just sick up code on their laps they tend to ask a few questions to make a few things before it clicks.

Once question however can you code? Is your code yours? Looks like I'm trying to start an argument here but I see some of your response and they're useless or offensive.

@Learn: This is actually quite complex if you wanted to make them pay at a certain location, this is because you want the checks to stay but you don't want to dump the tickets to pre-defined memory (which I what SA-MP uses) as it will simply be wasting RAM 99% of the time the players don't have checks to be cashed.

If you want an example from me I would like to see what save system you use, and if you use SSCANF as I will need to know this to provide decent help. If you don't need 100% help however in font I suggest this:

Command: Here I would do my SSCANF checks, work out the amount that's being paid to who, and take the money away from this players bank account at this point if you wanted to guarantee no abuse of the system where a player sends another player money, spends his money to put a loan or whatever on his account where his bank is in debt or where he never pays this back. I suppose you could program in an "bounce" system where checks won't always go through if the player has sent the money already.

Depositing: I would set the location as above with "IsPlayerInRangeOfPoint", this would allow me to see when they type /accept check that they are there, and not anywhere... Once you have done this load in the information from your Checks Saving system which is related to that player again I can't give an example as I don't know what systems you are using, although my overall outcome would be to display the name of the person into the dialog. Then I would make the player click this to see more information and to then accept the check and cash it.

Check Expiry, I would just check this when the player tries to deposit their check. Thus this for me would be saved in my Check System folder with the amount to be deposited and by who, don't check for this every game hour for example as it's wasted CPU time.

How I would personally save the checks: I would save them in INI files on the server, as this makes it a lot more simple, this would allow me to have a folder called "Check System", then when a player went to deposit money or received a check I would make a folder in that folder to hold their checks. Just save his checks with ID's from 0 to MAX_CHECKS.

On receipt of money I would then run a loop of MAX_CHECKS see if he can have more checks and then if he can dump it into the spare save file.

On Loading: I would use local variables, don't make these global as it will do what I'm describing to try and avoid here, for me these would like like:

pawn Код:
//Global encase used else where
enum pChecks
{
     CheckValue,
     CheckBy[MAX_PLAYER_NAME],
     CheckID
};

//local in the dialog response
new Checks[MAX_CHECKS][pChecks];
Load the information into that and then display it.

Then display a new dialog where they would input the ID of which check they wanted to act on as the format of my display would be like this:


Then when they respond and press any dialog entry if you display in a list like that or they click, OK. I would display a the dialog above I just described. Then send them to the next dialog

Final DIalog: Here it would display the full information of what you've collected, such as:



I would load this information in the final dialog with the following declaration:
pawn Код:
new Check[pChecks];
This is because you are loading this on a singularity basis and not loading the all their checks. This does mean more CPU time loading and unloading files, but the amount the system will get used is minimal. Therefore its better to hammer the CPU a bit for a second than occupy RAM 24/7.

If you want code added to this just post what your using and I will add some examples above to help you out, and then notify you that I've added them. If your saving with MySQL, I'm not helping with the saving however as I hate MySQL without working directly with the database.
Smart guy! Thank u very much about the information, god bless u!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)