Need help with "already doing this!"
#1

This is the code:

Код:
CMD:takeexam(playerid, params[])
{
	if(PlayerInfo[playerid][pDriveLic] == 1) return SCM(playerid, COLOR_GREY,"You already have a drivers license.");
	if(IsPlayerInVehicle(playerid, dmvc) || IsPlayerInVehicle(playerid, dmvc1) || IsPlayerInVehicle(playerid,dmvc2)  || IsPlayerInVehicle(playerid,dmvc3) || IsPlayerInVehicle(playerid,dmvc4))
	{
	    TogglePlayerControllable(playerid, 1);
	    CP[playerid] = 200;
		SetPlayerCheckpoint(playerid, -236.8177,1195.2351,19.3732, 4.0);
		TakingLesson[playerid] = 1;
		SendClientMessage(playerid, COLOR_LIGHTBLUE, "DMV: Please follow the checkpoints and drive safely !");
	}
	else return SCM(playerid, COLOR_GREY,"You are not in a DMV car.");
	return 1;
}
I wanted to make the command return a value if a player is already doing the exam, like this :
Код:
if(TakingLesson[playerid] = 1) return SCM(playerid, COLOR_GREY,"You already are taking the driving exam.");
Though only errors pop up when i stick it between the first to ifs, can someone help ?
Reply


Messages In This Thread
Need help with "already doing this!" - by -TmS - 04.08.2014, 22:16
Re: Need help with "already doing this!" - by Jefff - 04.08.2014, 22:29
Respuesta: Need help with "already doing this!" - by Cepillado - 04.08.2014, 22:29
Re: Need help with "already doing this!" - by -TmS - 04.08.2014, 22:34

Forum Jump:


Users browsing this thread: 1 Guest(s)