Quote:
Originally Posted by Moustafa
oh, i think it will be same thing.. like for example:
if(GetDistanceBetweenPlayerobj(playerid,xxxxx, xxxxx, xxxxx) < 15){ // place where to be so it can be opened
if(GetDistanceBetweenPlayerobj(playerid,xxxxx, xxxxx, xxxxx) < 15){ // place where to be so it can be closed
understand? ya know.. like:
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if((newkeys == KEY_HORN) && (IsPlayerInAnyVehicle(playerid))){ if(GetDistanceBetweenPlayerobj(playerid,1234.5, 1234.5, 1234.5) < 15){ // WHERE TO BE SO IT CAN BE OPENED MoveObject(gate1,xxxxx, xxxxxx, xxxxx); SendClientMessage(playerid, COLOR_RED, "You've opened the Gate."); return 1; } if(GetDistanceBetweenPlayerobj(playerid,6789.10, 6789.10, 9789.10) < 15){ // WHERE TO BE SO IT CAN BE CLOSED MoveObject(gate1,xxxxx,xxxxx,xxxxx); SendClientMessage(playerid, COLOR_RED, "You've closed the Gate."); return 1; } } return 0; }
I think so it is like that!
|
I understand what you did, that what I did before.. but it doesn't work.
Because the horn open the gate, OK! But there's nothing inside the code that indicate IF HORN AGAIN, the gate will be closed, understand?
That what I stuck
Anyways, thanks for you help!