11.03.2016, 22:24
no sй como tengas definida la variable de los vehнculos, pero podrнas usar algo como esto:
Use "Coche[h]" como si fuera el vehнculo.
PHP код:
if (strcmp("/llave1", cmdtext, true, 10) == 0)
{
for(new h = 0; h < sizeof(Coche); h++) // Existen varias llaves ??
{
if(Informacion[playerid][LlaveCoche1] != 0 && Informacion[playerid][LlaveCoche1] == h)
{
new Float:x,Float:y,Float:z;
GetVehiclePos(Coche[h], Float:x, Float:y, Float:z);
if (IsPlayerInRangeOfPoint(playerid, 7.0, x, y, z))
{
if(Coche[h][Cerradura] == 0) Coche[h][Cerradura] = 1;
else if(Coche[h][Cerradura] == 1) Coche[h][Cerradura] = 0;
}
}
}
return 1;
}