zcmd(apgarage, playerid, params[]){ if(IsAPolicia(playerid)){ if (PlayerToPoint(10, playerid,1589.053344,-1638.123168,14.122960)){ MoveDynamicObject(pdgate1,1599.053344,-1638.123168,14.122960, 0.8); PlayerPlaySound(playerid, 1153, 1589.053344,-1638.123168,14.122960); return 1; } if (PlayerToPoint(15, playerid,1545.7398681641, -1627.7280273438, 15.206203460693)){ MoveDynamicObject(pdgate2,1545.7392578125, -1627.7275390625, 20.381204605103, 3.0); SetTimer("GateClose5", 7000, 0); return 1; } else SendClientMessageEx(playerid, COLOR_GREY," No hay seсal!"); }
Hola gente quisieras saber como cambiar el /apgarage por la y osea yo estando serca de la reja al apretar la letra "y" se abra la reja.
Acб dejo el CMD si necesitan algo mas me dicen gracias por su atenciуn: Код:
zcmd(apgarage, playerid, params[]){ if(IsAPolicia(playerid)){ if (PlayerToPoint(10, playerid,1589.053344,-1638.123168,14.122960)){ MoveDynamicObject(pdgate1,1599.053344,-1638.123168,14.122960, 0.8); PlayerPlaySound(playerid, 1153, 1589.053344,-1638.123168,14.122960); return 1; } if (PlayerToPoint(15, playerid,1545.7398681641, -1627.7280273438, 15.206203460693)){ MoveDynamicObject(pdgate2,1545.7392578125, -1627.7275390625, 20.381204605103, 3.0); SetTimer("GateClose5", 7000, 0); return 1; } else SendClientMessageEx(playerid, COLOR_GREY," No hay seсal!"); } |
if (newkeys == KEY_YES)
{
new params[1];
cmd_apgarage(playerid, params);
}
if(newkeys == KEY_YES)
{
if(IsAPolicia(playerid)){
if (PlayerToPoint(10, playerid,1589.053344,-1638.123168,14.122960)){
MoveDynamicObject(pdgate1,1599.053344,-1638.123168,14.122960, 0.8);
PlayerPlaySound(playerid, 1153, 1589.053344,-1638.123168,14.122960);
return 1;
}
if (PlayerToPoint(15, playerid,1545.7398681641, -1627.7280273438, 15.206203460693)){
MoveDynamicObject(pdgate2,1545.7392578125, -1627.7275390625, 20.381204605103, 3.0);
SetTimer("GateClose5", 7000, 0);
}
}
Me olvide de algo osea quiero que por ejemplo cuando un policia este en el auto y aprete la letra Y se abra el porton pero si no esta en el auto no pueda abrirlo.
їComo seria para ponerlo asi con la letra y todo? |
if(newkeys == KEY_YES)
{
new conductor = GetPlayerState(playerid);
if(IsAPolicia(playerid)){
if(!conductor == PLAYER_STATE_DRIVER) return SendClientMessage(playerid,-1,"Debes Ser Conductor.");
if (PlayerToPoint(10, playerid,1589.053344,-1638.123168,14.122960)){
MoveDynamicObject(pdgate1,1599.053344,-1638.123168,14.122960, 0.8);
PlayerPlaySound(playerid, 1153, 1589.053344,-1638.123168,14.122960);
return 1;
}
if (PlayerToPoint(15, playerid,1545.7398681641, -1627.7280273438, 15.206203460693)){
MoveDynamicObject(pdgate2,1545.7392578125, -1627.7275390625, 20.381204605103, 3.0);
SetTimer("GateClose5", 7000, 0);
}
}
Hola lo hago y al apretar la letra no hace nada osea no se mueve el porton, tambien estuve viendo tutoriales de este foro como el de otacom y otro pero tampoco no se porque no abre
|