Gang Vehicle and Other trouble!
#1

Iam making some HQ's for gang's and iam having trouble on the code that stops normal non gang players from driving a organization vehicle...

of all vehicle id's they say the message "[{FF0000}Gangue{FFFFFF}]: Nгo йs dos {006600}Groove{FFFFFF}!"
either the ones belonging to Los Vagos, and the Groove and PSP...

i would like some help on this urgent!

Код:
	if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)
		{
			if (vehicle == 93 || 94) // LOS VAGOS VEHICLES || 94 || 95 || 96 || 97 || 98 || 99 || 100 || 101
			{
				if ((GetPVarInt(playerid, "pgangue")) == Groove)
			    {
					SetVehicleParamsEx(vehicle,1,lights,alarm,doors,bonnet,boot,objective);
					return 1;
				}
				else
				{
				    SendClientMessage(playerid, -1, "[{FF0000}Gangue{FFFFFF}]: Nгo йs dos {006600}Groove{FFFFFF}!");
					SetVehicleParamsEx(vehicle,0,lights,alarm,doors,bonnet,boot,objective);
					return 1;
				}
			}
			else if (vehicle == 84 || 85) // LOS VAGOS VEHICLES || 85 || 86 || 87 || 88 || 89 || 90 || 91 || 92
			{
				if ((GetPVarInt(playerid, "pgangue")) == Los_Vagos)
			    {
					SetVehicleParamsEx(vehicle,1,lights,alarm,doors,bonnet,boot,objective);
					return 1;
				}
				else
				{
				    SendClientMessage(playerid, -1, "[{FF0000}Gangue{FFFFFF}]: Nгo йs dos {FFFF00}Los Vagos{FFFFFF}!");
					SetVehicleParamsEx(vehicle,0,lights,alarm,doors,bonnet,boot,objective);
					return 1;
				}
			}
			else if ((GetVehicleModel(vehicle)) == 596) // PSP VEHICLEs || 427 || 523 || 601 || 497
		 	{
			    if ((GetPVarInt(playerid, "porgani")) == PSP)
			    {
					SetVehicleParamsEx(vehicle,1,lights,alarm,doors,bonnet,boot,objective);
					return 1;
				}
				else
				{
					SetVehicleParamsEx(vehicle,0,lights,alarm,doors,bonnet,boot,objective);
					SendClientMessage(playerid, -1, "[{33FF99}Organizaзгo{FFFFFF}]: Nгo йs da {0000FF}PSP{FFFFFF}!");
					return 1;
				}
			}
Any advice is welcome, and it will allways be!
Reply
#2

pawn Код:
if (vehicle == 93 || 94)
change to:
pawn Код:
if (vehicle == 93 || vehicle == 94)
If statement doesn't know what 94 for means, it needs assigned local variable before. Do the same to the rest of your code. And next time, please upload your code to pastebin (if its really long, like this one).
Reply
#3

Thanks, will do!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)