Confused.. help me please
#1

Код:
	if(model != 403 || model != 515) {
		SendClientMessage(playerid, X11_TOMATO_2, "You must be in a truck!");
		return 1;
this is the code.. even when Im in those 2 trucks it still says you must be in a truck... why
Reply
#2

Show us all the command or the function
Reply
#3

Quote:
Originally Posted by HoussemGaming
Посмотреть сообщение
Show us all the command or the function
There you go:

Код:
YCMD:startjob(playerid, params[], help)
{
    new carid = GetPlayerVehicleID(playerid);
	new model = GetVehicleModel(carid);
	new job = GetPVarInt(playerid, "Job");
	if(!IsPlayerInAnyVehicle(playerid)) {
		SendClientMessage(playerid, X11_TOMATO_2, "You aren't in a car");
		return 1;
	}
	if(model != 403 || model != 515) {
		SendClientMessage(playerid, X11_TOMATO_2, "You must be in a truck!");
		return 1;
	}
	if(job != EJobType_Smuggler)
	{
	    SendClientMessage(playerid, X11_TOMATO_2, "You must be a Trucker for this!");
	    return 1;
	}
	new vehicleid = GetPlayerVehicleID(playerid);
	if(truckerjob[playerid] == 1)
	{
	    SendClientMessage(playerid, X11_TOMATO_2, "You can't do this right now");
	    return 1;
	}
	if(!IsTrailerAttachedToVehicle(vehicleid))
	{
	    SendClientMessage(playerid, X11_WHITE, "Please attach the trailer to start the job!");
	    return 1;
	}
	truckerjob[playerid] = 1;
	startSmugglerRoute(playerid);
 return 1;
}
Reply
#4

Change the || to an &&.
Reply
#5

Quote:
Originally Posted by Arthur Kane
Посмотреть сообщение
Change the || to an &&.
Thanks, fixed +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)