More drugs on payday !
#1

Hello , i want to add more drugs on payday . There is curently set on 1 gram but i want to add 25 grams on payday ! Can you tell me what to modifi ? This is the pawno code :

Код:
			  format(string, sizeof(string), "_______< Bank of %s >________", GAMEMODE_MAP);
			  SendClientMessage(i, COLOR_BLUE, string);
			  format(string, sizeof(string), " Level: %d, Exp: %d", PlayerInfo[i][pLevel], PlayerInfo[i][pExp]);
				SendClientMessage(i, COLOR_GREY, string);
				format(string, sizeof(string), " Balance: $%d", PlayerInfo[i][pBank]);
				SendClientMessage(i, COLOR_GREY, string);
				format(string, sizeof(string), " Drugs: %d gram.", PlayerInfo[i][pDrugs]);
				SendClientMessage(i, COLOR_GREY, string);

				PlayerInfo[i][pExp] ++;
				if(PlayerInfo[i][pVip] == 1){PlayerInfo[i][pExp] ++;} // 1 Extra exp for vips.
				PlayerInfo[i][pDrugs] ++;
				if(PlayerInfo[i][pVip] == 1){PlayerInfo[i][pDrugs] ++;} // 1 Extra gram drugs for vips.
				PlayerInfo[i][pBank] = PlayerInfo[i][pBank]+PlayerInfo[i][pLevel]*PAYDAY_MONEY;

				if(PlayerInfo[i][pExp] >= PlayerInfo[i][pLevel])
				{
				  PlayerInfo[i][pExp] = 0;
				  PlayerInfo[i][pLevel] ++;
				}

				SendClientMessage(i, COLOR_WHITE, "|--------------------------------------------------|");
				format(string, sizeof(string), " New Level: %d, New Exp: %d", PlayerInfo[i][pLevel], PlayerInfo[i][pExp]);
				SendClientMessage(i, COLOR_GREY, string);
				format(string, sizeof(string), " New Balance: $%d", PlayerInfo[i][pBank]);
				SendClientMessage(i, COLOR_GREY, string);
				format(string, sizeof(string), " New Drugs: %d gram.", PlayerInfo[i][pDrugs]);
				SendClientMessage(i, COLOR_GREY, string);
				SendClientMessage(i, COLOR_BLUE, "________________________________");
				format(string, sizeof(string), "~b~PayDay~n~~w~Paycheck ~n~~g~$%d", PlayerInfo[i][pLevel]*PAYDAY_MONEY);
				GameTextForPlayer(i, string, 5000, 1);
Reply
#2

Код:
			  format(string, sizeof(string), "_______< Bank of %s >________", GAMEMODE_MAP);
			  SendClientMessage(i, COLOR_BLUE, string);
			  format(string, sizeof(string), " Level: %d, Exp: %d", PlayerInfo[i][pLevel], PlayerInfo[i][pExp]);
				SendClientMessage(i, COLOR_GREY, string);
				format(string, sizeof(string), " Balance: $%d", PlayerInfo[i][pBank]);
				SendClientMessage(i, COLOR_GREY, string);
				format(string, sizeof(string), " Drugs: %d gram.", PlayerInfo[i][pDrugs]);
				SendClientMessage(i, COLOR_GREY, string);

				PlayerInfo[i][pExp] ++;
				if(PlayerInfo[i][pVip] == 1){PlayerInfo[i][pExp] ++;} // 1 Extra exp for vips.
				PlayerInfo[i][pDrugs] + 25;
				if(PlayerInfo[i][pVip] == 1){PlayerInfo[i][pDrugs] ++;} // 1 Extra gram drugs for vips.
				PlayerInfo[i][pBank] = PlayerInfo[i][pBank]+PlayerInfo[i][pLevel]*PAYDAY_MONEY;

				if(PlayerInfo[i][pExp] >= PlayerInfo[i][pLevel])
				{
				  PlayerInfo[i][pExp] = 0;
				  PlayerInfo[i][pLevel] ++;
				}

				SendClientMessage(i, COLOR_WHITE, "|--------------------------------------------------|");
				format(string, sizeof(string), " New Level: %d, New Exp: %d", PlayerInfo[i][pLevel], PlayerInfo[i][pExp]);
				SendClientMessage(i, COLOR_GREY, string);
				format(string, sizeof(string), " New Balance: $%d", PlayerInfo[i][pBank]);
				SendClientMessage(i, COLOR_GREY, string);
				format(string, sizeof(string), " New Drugs: %d gram.", PlayerInfo[i][pDrugs]);
				SendClientMessage(i, COLOR_GREY, string);
				SendClientMessage(i, COLOR_BLUE, "________________________________");
				format(string, sizeof(string), "~b~PayDay~n~~w~Paycheck ~n~~g~$%d", PlayerInfo[i][pLevel]*PAYDAY_MONEY);
				GameTextForPlayer(i, string, 5000, 1);
Reply
#3

can you please tell me what have you changed ?! Lol i figured it out but this doesnt help still the same 1 gram / payday ! So this doesn't works !
Reply
#4

UP !
Reply
#5

This is what I changed:
pawn Код:
PlayerInfo[i][pExp] ++;
                if(PlayerInfo[i][pVip] == 1){PlayerInfo[i][pExp] ++;} // 1 Extra exp for vips.
                PlayerInfo[i][pDrugs] + 25;
                if(PlayerInfo[i][pVip] == 1){PlayerInfo[i][pDrugs] ++;} // 1 Extra gram drugs for vips.
                PlayerInfo[i][pBank] = PlayerInfo[i][pBank]+PlayerInfo[i][pLevel]*PAYDAY_MONEY;
So if that doesn't work, there's somewhere else doing your payday.
Reply
#6

Код:
			  format(string, sizeof(string), "_______< Bank of %s >________", GAMEMODE_MAP);
			  SendClientMessage(i, COLOR_BLUE, string);
			  format(string, sizeof(string), " Level: %d, Exp: %d", PlayerInfo[i][pLevel], PlayerInfo[i][pExp]);
				SendClientMessage(i, COLOR_GREY, string);
				format(string, sizeof(string), " Balance: $%d", PlayerInfo[i][pBank]);
				SendClientMessage(i, COLOR_GREY, string);
				format(string, sizeof(string), " Drugs: %d gram.", PlayerInfo[i][pDrugs]);
				SendClientMessage(i, COLOR_GREY, string);

				PlayerInfo[i][pExp] ++;
				if(PlayerInfo[i][pVip] == 1){PlayerInfo[i][pExp] ++;} // 1 Extra exp for vips.
				PlayerInfo[i][pDrugs] +25;
				if(PlayerInfo[i][pVip] == 1){PlayerInfo[i][pDrugs] +25;} // 1 Extra gram drugs for vips.
				PlayerInfo[i][pBank] = PlayerInfo[i][pBank]+PlayerInfo[i][pLevel]*PAYDAY_MONEY;
If i write this i get the following warnings !!
Код:
D:\Gta san andreas\GTA San Andreas\server\gamemodes\slrpg.pwn(3553) : warning 215: expression has no effect
D:\Gta san andreas\GTA San Andreas\server\gamemodes\slrpg.pwn(3554) : warning 215: expression has no effect
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.
Reply
#7

Just change the == with += (amount) without the ()
Then you will add that amount

And you can also use -=
Reply
#8

Can you modifi there please i suck at scripting ! and i don't understand ! Bartje you didn't understand ! I don't want to add more drugs for V.I.P i want to add more drugs for normal players ! Look at normal script up !
Reply
#9

Change this:
pawn Код:
PlayerInfo[i][pDrugs] ++;
To something like this:
pawn Код:
PlayerInfo[i][pDrugs] += 25;
Or any number you want.
Reply
#10

Ty i solved it ! Tks a lot !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)