11.09.2017, 20:14
PHP код:
// Callback
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys == KEY_CROUCH)
{
AbrirPortao(playerid);
}
return 1;
}
// Function
AbrirPortao(playerid)
{
if(IsPlayerInAnyVehicle(playerid) || IsPlayerInRangeOfPoint(playerid, 20.0, 1067.3000488281, 1357.4000244141, 12.60000038147))
{
if(pAdmin[playerid] >= 0)
{
MoveDynamicObject(ObjectsFix[24], 1067.3000488281, 1357.4000244141, 17.60000038147, 3.0);
SetTimerEx("MoverObjeto", 10000, false, "iffff", ObjectsFix[24], 1067.3000488281, 1357.4000244141, 12.60000038147, 3.0);
SendClientMessage(playerid, 0xFFFFFFAA, "Portгo da Conce aberto!");
SendClientMessage(playerid, Amarelo, "O portгo fecha em 10 segundos!");
}
}
return 1;
}