View Single Post
Old 09/12/2019, 05:13 PM   #4
NaS
High-roller
 
NaS's Avatar
 
Join Date: Mar 2008
Location: 🇩🇪
Posts: 1,774
Reputation: 619
Default Re: Help with vehicleid

Code:
for(new i=0; i<sizeof(KraftstoffCars); i++)
{
	if(vID == KraftstoffCars[i][kID])
	{
		if(GetVehicleModel(GetVehicleTrailer(vID)) == 584)
		{
			tInfo[tID[playerid]][tFuelStand] = 100;
			SendClientMessage(playerid, COLOR_YELLOW, "You filled the gas pump.");
			GameTextForPlayer(playerid, "~g~PAYDAY +1500 $", 2000, 6);
			pInfo[playerid][payday] += 1500;
			return 1;
		}
		return SendClientMessage(playerid, COLOR_RED, "Your Truck doesn't have the right Trailer.");
	}
}
return SendClientMessage(playerid, COLOR_RED, "You are not sitting in an Job-Truck");
Now the message will only be sent if none of the trucks are driven by the player, since you use return in any other case.
NaS is offline   Reply With Quote