12.02.2017, 16:22
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!
2. I want to put a restriction to [/examen] command. When IsPlayerInAnyVehicle, don't let him use the command.
Thank you!
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. }
Код:
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; }