16.07.2015, 13:37
Hello, I've got a little problem. I've made a system which allows the player to open a vehicle's doors if he/she has an object in their slot 3.
Before doing /abrirvehiculo, the character doesn't even try to open it, all good. But after doing /abrirvehiculo with the third slot used, the car doors should be open, but the character tries to open the door instead, and it isn't open. Can aynone help me? Thanks!
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/abrirvehiculo", cmdtext, true, 10) == 0) { if(IsPlayerNearVehicle(playerid, vt1, 10.0) && IsPlayerAttachedObjectSlotUsed(playerid, 3)) { SetVehicleParamsForPlayer(vt1, playerid, 0, 0); SetVehicleParamsEx(vt1, 1, 0, 0, 0, 0, 0, 0); SendClientMessage(playerid, RED, "Has forzado la cerradura del vehiculo."); } return 1; } return 0; }