if (strcmp("/llave1", cmdtext, true, 10) == 0) { for(new h = 0; h < sizeof(Coche); h++) { if(Informacion[playerid][LlaveCoche1] != 0 && Informacion[playerid][LlaveCoche1] == h) { if(PlayerToPoint(6, playerid,)) if(Coche[h][Cerradura] == 0) { Coche[h][Cerradura] = 1; } else if(Coche[h][Cerradura] == 1) { Coche[h][Cerradura] = 0; } } } return 1; }
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;
}
error 035: argument type mismatch (argument 1) |
Gracias por ayudarme, pero me da un error en la lнnea que empieza diciendo "GetVehiclePos...", este:
Cada usuario puede tener 3 vehнculos como mбximo. |
GetVehiclePos(Coche[h], x, y, z);
if (strcmp("/llave1", cmdtext, true, 10) == 0) { for(new h = 0; h < sizeof(Coche); h++) { if(Informacion[playerid][LlaveCoche1] != 0 && Informacion[playerid][LlaveCoche1] == h) { new Float:x,Float:y,Float:z; GetVehiclePos(h, Float:x, Float:y, Float:z); if(IsPlayerInRangeOfPoint(playerid, 7.0, x, y, z)) { if(Coche[h][Cerradura] == 0) { Coche[h][Cerradura] = 1; SetVehicleParamsCarDoors(h,0,0,0,0); } else if(Coche[h][Cerradura] == 1) { Coche[h][Cerradura] = 0; SetVehicleParamsCarDoors(h,1,1,1,1); } } } } return 1; }