Some problems
#1

Hello everyone, i just made a DMV system and didn't work properly.
1. I want to put a restriction when a player wants to get in the exam car, but i can't figure it out!
Код:
if(vehicleid == examen[0] || vehicleid == examen[1] || vehicleid == examen[2] || vehicleid == examen[3] || vehicleid == examen[4])
	{
		SendClientMessage(playerid, -1, "INFO: Those cars can be used only in exam");	
		RemovePlayerFromVehicle(playerid); // This is not working.
	}
2. I want to put a restriction to [/examen] command. When IsPlayerInAnyVehicle, don't let him use the command.
Код:
CMD:examen(playerid, params[])
{
	if(IsPlayerInRangeOfPoint(playerid, 8.0, 1312.2740, -1387.2186, 13.5491))
	{
		if(InExam[playerid] == 1) return SendClientMessage(playerid, -1, "INFO: You are already in the exam");
		for(new v = 0; v < 5; v++)
	{
		PutPlayerInVehicle(playerid, examen[v], 0);
	}
		SendClientMessage(playerid, -1, "INFO: Follow the checkpoints to finish the exam");
		InExam[playerid] = 1;
	}
	else
	{
		SendClientMessage(playerid, -1, "INFO: You have to be in front of the DMV");
		if(IsPlayerInAnyVehicle(playerid)) 
	{
		SendClientMessage(playerid, 0x00FF00AA, "You are in a vehicle.");
		// what command needs to be here?!
	}
	}
    return 1;
}
Thank you!
Reply


Messages In This Thread
Some problems - by sKenzi1996 - 12.02.2017, 16:22
Re: Some problems - by Dayrion - 12.02.2017, 16:45
Re: Some problems - by sKenzi1996 - 12.02.2017, 17:09
Re: Some problems - by Dayrion - 12.02.2017, 17:37
Re: Some problems - by sKenzi1996 - 12.02.2017, 17:52
Re: Some problems - by Dayrion - 12.02.2017, 18:42

Forum Jump:


Users browsing this thread: 1 Guest(s)