Help Paycheck Amount
#1

Okay, I have a paycheck system right now. I get way to much though! I got 12,000 last paycheck! I need it to be like 1,200 because this is a roleplay server

Is there a way I can set the paycheck price per job? l
Like

Un-Employment: 250
Taxi: 500
etc
Reply
#2

Well, do you have an account saver?

If yes, you can make the different earnings like this:

pawn Код:
new CurrentJob[MAX_PLAYERS][10]; //The 10 are the different Levels

// Where you pay them out:

if(CurrentJob[playerid]==1) GivePlayerMoney(playerid, 250);
if(CurrentJob[playerid]==2) GivePlayerMoney(playerid, 500);
//...
Is this what you wanted?
Reply
#3

Quote:
Originally Posted by Jeffry
Well, do you have an account saver?

If yes, you can make the different earnings like this:

pawn Код:
new CurrentJob[MAX_PLAYERS][10]; //The 10 are the different Levels

// Where you pay them out:

if(CurrentJob[playerid]==1) GivePlayerMoney(playerid, 250);
if(CurrentJob[playerid]==2) GivePlayerMoney(playerid, 500);
//...
Is this what you wanted?
Yes I believe so, Thank you very much!, Just a few questions? Would I put that under "public payday"
and would the 1 or 2 after == be the job id?
Reply
#4

Yes, put it under "public payday"

And, yes, the 1, 2, 3... are the Job IDs.
Reply
#5

Quote:
Originally Posted by Jeffry
Yes, put it under "public payday"

And, yes, the 1, 2, 3... are the Job IDs.
So i would change the "10" to how many job ids i have?
Reply
#6

Yes!

new CurrentJob[MAX_PLAYERS][10]; // Change this to how many job is

if(CurrentJob[playerid]==1) GivePlayerMoney(playerid, 250); // Unemployment
if(CurrentJob[playerid]==2) GivePlayerMoney(playerid, 500); // Taxi


Hope this helped
Reply
#7

K thank you, sorry for so many questions
Reply
#8

Np Mate Enjoy Your Roleplay Server
Reply
#9

Quote:

public PayDay()
{
new CurrentJob[MAX_PLAYERS][23]; //The 23 are the different Jobs

/*--[PayOut]--*/

if(CurrentJob[playerid]==1) GivePlayerMoney(playerid, 1250); //Detective
if(CurrentJob[playerid]==2) GivePlayerMoney(playerid, 1450); //Lawyer
if(CurrentJob[playerid]==3) GivePlayerMoney(playerid, 250); //Whore
if(CurrentJob[playerid]==4) GivePlayerMoney(playerid, 250); //Drugs Dealer
if(CurrentJob[playerid]==5) GivePlayerMoney(playerid, 250); //Car Jacker
if(CurrentJob[playerid]==6) GivePlayerMoney(playerid, 875); //News Reporter
if(CurrentJob[playerid]==7) GivePlayerMoney(playerid, 525); //Car Mechanic
if(CurrentJob[playerid]== GivePlayerMoney(playerid, 350); //Bodyguard
if(CurrentJob[playerid]==9) GivePlayerMoney(playerid, 250); //Arms Dealer
if(CurrentJob[playerid]==10) GivePlayerMoney(playerid, 1125);//Police Officer
if(CurrentJob[playerid]==12) GivePlayerMoney(playerid, 850); //Boxer
if(CurrentJob[playerid]==14) GivePlayerMoney(playerid, 400); //Bus Driver
if(CurrentJob[playerid]==15) GivePlayerMoney(playerid, 325); //Paper Boy
if(CurrentJob[playerid]==16) GivePlayerMoney(playerid, 910); //Trucker
if(CurrentJob[playerid]==17) GivePlayerMoney(playerid, 450); //Pizza Boy
if(CurrentJob[playerid]==1 GivePlayerMoney(playerid, 350); //Farmer
if(CurrentJob[playerid]==19) GivePlayerMoney(playerid, 250); //Illegal Farmer
if(CurrentJob[playerid]==20) GivePlayerMoney(playerid, 250); //Drugs Smuggler
if(CurrentJob[playerid]==21) GivePlayerMoney(playerid, 850); //Street Sweeper
if(CurrentJob[playerid]==22) GivePlayerMoney(playerid, 250); //Materials Smiggler
if(CurrentJob[playerid]==23) GivePlayerMoney(playerid, 250); //Gun Maker

/*----Setpay-Made-by-TonyTone-with-help-of-jeffry----*/

It crashes pawno's compiler
Reply
#10

remove 'new CurrentJob[MAX_PLAYERS][23];' from the public declare, place it at the top with all your includes and defines.
Reply
#11

Yes sorry forgot to mention that yes if you remove new CurrentJob[MAX_PLAYERS][23]; and put it on top under "#include <a_samp>" and then your pawno compile should work
Reply
#12

Still doesnt work
Reply
#13

What are your error now
Reply
#14

I dont get an error, the pawno comiler just crashes when i run it now
Reply
#15

hmmmmm

Delete the line then see what u get
Reply
#16

Okay i tried again with everything in the script, and no i get these errors
Quote:

:\Program Files\Rockstar Gamez\GTA San Andreas\pawno\include\utils.inc(1) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Antonio\Desktop\gtarp.pwn(1663) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Antonio\Desktop\gtarp.pwn(1707) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Antonio\Desktop\gtarp.pwn(1736) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Antonio\Desktop\gtarp.pwn(1805) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Antonio\Desktop\gtarp.pwn(1912) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Antonio\Desktop\gtarp.pwn(1933) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Antonio\Desktop\gtarp.pwn(2066) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Antonio\Desktop\gtarp.pwn(2671) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Antonio\Desktop\gtarp.pwn(2889) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Antonio\Desktop\gtarp.pwn(2924) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Antonio\Desktop\gtarp.pwn(2937) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Antonio\Desktop\gtarp.pwn(2947) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Antonio\Desktop\gtarp.pwn(2976) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Antonio\Desktop\gtarp.pwn(299 : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Antonio\Desktop\gtarp.pwn(3093) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Antonio\Desktop\gtarp.pwn(310 : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Antonio\Desktop\gtarp.pwn(3155) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Antonio\Desktop\gtarp.pwn(3170) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Antonio\Desktop\gtarp.pwn(3223) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Antonio\Desktop\gtarp.pwn(3335) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Antonio\Desktop\gtarp.pwn(3797) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Antonio\Desktop\gtarp.pwn(4381) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Antonio\Desktop\gtarp.pwn(4391) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Antonio\Desktop\gtarp.pwn(4401) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Antonio\Desktop\gtarp.pwn(4411) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Antonio\Desktop\gtarp.pwn(4423) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Antonio\Desktop\gtarp.pwn(6197) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Antonio\Desktop\gtarp.pwn(6814) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Antonio\Desktop\gtarp.pwn(750 : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Antonio\Desktop\gtarp.pwn(7633) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Antonio\Desktop\gtarp.pwn(784 : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Antonio\Desktop\gtarp.pwn(8672) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Antonio\Desktop\gtarp.pwn(8722) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Antonio\Desktop\gtarp.pwn(9175) : warning 219: local variable "account" shadows a variable at a preceding level
C:\Users\Antonio\Desktop\gtarp.pwn(9359) : warning 219: local variable "key" shadows a variable at a preceding level
C:\Users\Antonio\Desktop\gtarp.pwn(9997) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Antonio\Desktop\gtarp.pwn(10832) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Antonio\Desktop\gtarp.pwn(10896) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Antonio\Desktop\gtarp.pwn(10932) : error 017: undefined symbol "playerid"
C:\Users\Antonio\Desktop\gtarp.pwn(10932) : error 017: undefined symbol "playerid"
C:\Users\Antonio\Desktop\gtarp.pwn(10933) : error 017: undefined symbol "playerid"
C:\Users\Antonio\Desktop\gtarp.pwn(10933) : error 017: undefined symbol "playerid"
C:\Users\Antonio\Desktop\gtarp.pwn(10934) : error 017: undefined symbol "playerid"
C:\Users\Antonio\Desktop\gtarp.pwn(10934) : error 017: undefined symbol "playerid"
C:\Users\Antonio\Desktop\gtarp.pwn(10935) : error 017: undefined symbol "playerid"
C:\Users\Antonio\Desktop\gtarp.pwn(10935) : error 017: undefined symbol "playerid"
C:\Users\Antonio\Desktop\gtarp.pwn(10936) : error 017: undefined symbol "playerid"
C:\Users\Antonio\Desktop\gtarp.pwn(10936) : error 017: undefined symbol "playerid"
C:\Users\Antonio\Desktop\gtarp.pwn(10937) : error 017: undefined symbol "playerid"
C:\Users\Antonio\Desktop\gtarp.pwn(10937) : error 017: undefined symbol "playerid"
C:\Users\Antonio\Desktop\gtarp.pwn(1093 : error 017: undefined symbol "playerid"
C:\Users\Antonio\Desktop\gtarp.pwn(1093 : error 017: undefined symbol "playerid"
C:\Users\Antonio\Desktop\gtarp.pwn(10939) : error 017: undefined symbol "playerid"
C:\Users\Antonio\Desktop\gtarp.pwn(10939) : error 017: undefined symbol "playerid"
C:\Users\Antonio\Desktop\gtarp.pwn(10940) : error 017: undefined symbol "playerid"
C:\Users\Antonio\Desktop\gtarp.pwn(10940) : error 017: undefined symbol "playerid"
C:\Users\Antonio\Desktop\gtarp.pwn(10941) : error 017: undefined symbol "playerid"
C:\Users\Antonio\Desktop\gtarp.pwn(10941) : error 017: undefined symbol "playerid"
C:\Users\Antonio\Desktop\gtarp.pwn(10942) : error 017: undefined symbol "playerid"
C:\Users\Antonio\Desktop\gtarp.pwn(10942) : error 017: undefined symbol "playerid"
C:\Users\Antonio\Desktop\gtarp.pwn(10943) : error 017: undefined symbol "playerid"
C:\Users\Antonio\Desktop\gtarp.pwn(10943) : error 017: undefined symbol "playerid"
C:\Users\Antonio\Desktop\gtarp.pwn(10944) : error 017: undefined symbol "playerid"
C:\Users\Antonio\Desktop\gtarp.pwn(10944) : error 017: undefined symbol "playerid"

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


26 Errors.

Reply
#17

Made anywhere a { or } too much, or too less?
Maybe you can post lines 10832 - 10944...
Reply
#18

Local variable "string" shadows a variable at a preceding level.mmm
Try renaming the string to anything else. If that doesn't work, you have declared "new string" two or more times in the same function.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)