[HELP] fishing permet
#10

replace this

pawn Код:
PlayerInfo[i][pFishLicenseTime] -= 1;
with this.

pawn Код:
if(PlayerInfo[i][pFishLicenseTime] > 0)
{
  PlayerInfo[i][pFishLicenseTime] -= 1;
}
That will stop the fishing license time from dropping below 0.


_________________________________________
Alt: You can also do this as an alternate way.
pawn Код:
PlayerInfo[i][pFishLicenseTime] -= 1;
if(Playerinfo[i][pFishLicenseTime] <= 0)
{
  PlayerInfo[i][pFishLicenseTime]++;
}
This will still drop the amount by 1, but then checks if its below 0 and if it is, it adds 1. This makes it 0 again. Both ways will work. Its up to you which you prefer.
Reply


Messages In This Thread
[HELP] fishing permet - by linxx - 05.03.2009, 22:13
Re: [HELP] fishing permet - by Mikep - 05.03.2009, 23:21
Re: [HELP] fishing permet - by Snyper18 - 05.03.2009, 23:23
Re: [HELP] fishing permet - by Mikep - 05.03.2009, 23:25
Re: [HELP] fishing permet - by Snyper18 - 05.03.2009, 23:57
Re: [HELP] fishing permet - by linxx - 06.03.2009, 00:18
Re: [HELP] fishing permet - by [RP]Rav - 06.03.2009, 06:12
Re: [HELP] fishing permet - by MenaceX^ - 06.03.2009, 11:26
Re: [HELP] fishing permet - by Linxx87 - 13.03.2009, 05:13
Re: [HELP] fishing permet - by Kinetic - 13.03.2009, 11:21

Forum Jump:


Users browsing this thread: 1 Guest(s)