SA-MP Forums Archive
a problem i cant find - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: a problem i cant find (/showthread.php?tid=86338)



a problem i cant find - [GF]sIdEkIcK - 13.07.2009

hey, i have a problem which i cant find in this code:

Код:
if (strcmp(cmd, "/fix", true)==0) {
       if(GetPlayerMoney(playerid) <= 100) {
	     SendClientMessage(playerid,BRIGHTRED,"=> You do not have enought money, you need $100 to fix your Vehicle.");
	     return 1; }
		 else {
		 if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) {
		 new VehicleID;
		 VehicleID=GetPlayerVehicleID(playerid);
		 GivePlayerMoney(playerid,-100);
		 SetVehicleHealth(VehicleID,100);
		 SendClientMessage(playerid,COLOR_YELLOW,"=> Vehicle Fixed.");
		 return 1; }
		 else {
		 SendClientMessage(playerid,BRIGHTRED,"=> You are not in a vehicle.");
		 return 1; } } }
am i just blind or something? but it makes my vehicle go on FIRE and it doesnt fix it. plz help?


Re: a problem i cant find - Correlli - 13.07.2009

Vehicle's max. health is 1000 and not 100. That's the problem.


Re: a problem i cant find - [GF]sIdEkIcK - 13.07.2009

Quote:
Originally Posted by Don Correlli
Vehicle's max. health is 1000 and not 100. That's the problem.
lol oh :P oops xD thnx


Re: a problem i cant find - Correlli - 13.07.2009

You're welcome. :P