SA-MP Forums Archive
returning vehicles health and indexing. - 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: returning vehicles health and indexing. (/showthread.php?tid=80822)



returning vehicles health and indexing. - Gamer007 - 06.06.2009

Код:
else if(GetVehicleHealth(GetPlayerVehicleID(playerid)) < 600)
		{
		  return SendClientMessage(playerid,COLOR_ORANGE,"[INFO] Masina perdaug sutrankyta."), TogglePlayerControllable(playerid,true);
		}
		else if(GetPlayerVehicleID(playerid) == badCars)
		{
			return SendClientMessage(playerid,COLOR_ORANGE,"[INFO] Atsiprasome sito autmobilio nesuperkame."), TogglePlayerControllable(playerid,true);
		}
the errors are these:

Код:
E:\Games Setup\Gta san andreas server\Install\samp02Xserver.win32\gamemodes\SZM.pwn(11646) : warning 202: number of arguments does not match definition
E:\Games Setup\Gta san andreas server\Install\samp02Xserver.win32\gamemodes\SZM.pwn(11650) : error 033: array must be indexed (variable "badCars")
first warning points to else if (GetVehiclehealth..
and the second to

else if(getplayervehicleID.

the bad car code is this:

Код:
new badCars[MAX_BAD_CARS] = {
		603,506,401,406,407,408,416,417,420,423,425,427,428,430,431,432,433,437,438,442,443,447,470,490,514,515,523,524,525,528,534,535,536,544,552,556,557,582,596,597,598,599,601
		};



Re: returning vehicles health and indexing. - Donny_k - 06.06.2009

Well look on the Wiki at the arguments for the function 'GetVehicleHealth' and while you are there take a look at the arrays explination also.


Re: returning vehicles health and indexing. - Gamer007 - 06.06.2009

fixed the health but for arrays i didn't understand what exactly to do.


Re: returning vehicles health and indexing. - Donny_k - 06.06.2009

Read this.

Post which part you don't get after reading it.




Re: returning vehicles health and indexing. - Gamer007 - 06.06.2009

you see i know english well but i don't know things like variables,arrays and kind of and using my dictionary it translates wrong.